Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Duplicate catalog information

Duplicate catalog information

2007-04-12       - By Elke Schmidtke

 Back
Hi,
I made a procedure that builds up a dynamic select.
The procedure works fine with 7.5.xx, but produces an error on version
7.6.00.32.

CREATE DBPROC PROC_STAT_ABGL (IN NUTZERID INT, IN SANR INT, IN SA_KF
CHAR(2),
  IN TAG DATE, IN SCHULEN VARCHAR(1000))AS
VAR
SCHUL_SEL1 VARCHAR(1200); SEL_STM VARCHAR(5000);

....
/* Here I set values depending on parameter SCHULEN.
SCHULEN can be a list of numbers (as string) that are keys in table
T_SCHULE or can be an empty string if all keys from T_SCHULE for a
specific SCHULAMT_NR are wished */

IF LENGTH(SCHULEN) > 1 THEN
/* case 1*/
  SET SCHUL_SEL1 = SCHULEN
ELSE
/* case 2 */
  SET SCHUL_SEL1 = 'SELECT S.SCHUL_ID FROM DBA.T_SCHULE S WHERE
S.SCHULAMT_NR=' || SANR;

/* now the statement is build */

SET SEL_STM 'INSERT INTO DBA.T_STAT_ABG' ||
  '(NUTZER_ID, AB, PERS_NR, NNAME, VORNAME, AU_STD, URL_STD,
EINS_STD,' ||
  'ABW_GRUND_SL, ABW_GRUND, SCHUL_ID, SCHUL_NR, SCHULNAME, ORT)
'||
'SELECT ' || CHR(NUTZERID) || ' AS NUTZER_ID,' ||
  '''A'' AS AB,' ||
  'P.PERS_NR +(10+' || CHR(SANR) || ')*1000000 AS PERS_NR,' ||
  'P.NNAME, P.VORNAME, ' ||
  'VALUE(A.STUNDEN,0) AS AU_STD,' ||
  'VALUE(B.STUNDEN,0) AS URL_STD,' ||
  'VALUE(E.STUNDEN,0) AS EINS_STD,' ||
  'VALUE(ABWES.ABW_GRUND_SL,-1) AS ABW_GRUND_SL, ABWES.ABW_GRUND,
' ||
  'P.SCHUL_ID, P.SCHUL_NR, P.SCHULNAME, P.ORT ' ||
'FROM   DBA.VT_PERS_AND_DBV_' || SA_KF || ' P ' ||
*.
'WHERE P.BEGINN <= ' || STICHTAG || ' AND ' || STICHTAG || ' <= P.ENDE
' ||
  'AND P.SCHUL_ID IN (' || SCHUL_SEL1 || ')';
TRY
  EXECUTE SEL_STM;
CATCH
   STOP ($RC, 'SEL1 ' & $ERRMSG  );

In case 1 everything works perfect,  case 2 produces only on version
7.6.00.32
The error
General error;-9206 POS(1) SEL1 System error: AK Duplicate catalog
information:FF000010021200200

Any help ?
Elke


--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/maxdb?unsub=mysql@(protected)