View previous topic :: View next topic |
Author |
Message |
tejas Beginner
Joined: 12 Mar 2003 Posts: 3 Topics: 1
|
Posted: Wed Mar 12, 2003 7:54 pm Post subject: DB2 Reason Code Information |
|
|
Dear all
i have got one error SQL30020N after firing db2 query
Reason code 124C-00
SqlState 58009
This error i have got after firing simple select sql which has IN statement.
I do not have any other information to share.
Can somebody please tell me what could be possible reason ? |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed Mar 12, 2003 10:45 pm Post subject: |
|
|
Tejas,
The reason code = X'124C ' means you have a Syntax Error Code (SYNERRCD) . Check your sql syntax and re run the query. or post the sql query in here and we may take a look at it
Hope this helps...
cheers
kolusu |
|
Back to top |
|
|
tejas Beginner
Joined: 12 Mar 2003 Posts: 3 Topics: 1
|
Posted: Fri Mar 14, 2003 11:48 pm Post subject: |
|
|
Deal kolusu
thanks a lot for the reply
i have a very simple query... as it is like this
select DISINXCD as typeCodeNo, DISKMKMJ AS contractStatus
FROM TBRA0990
where DISINXCD in ( "+Codes+")
where codes is a variable which will have comma seperated values
thanks in advance
bye |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Sat Mar 15, 2003 8:37 am Post subject: |
|
|
Teja,
Why is there is a + character used before the codes?? Are you using it as an escape character. If so then you should have 2 ++ or +_ . But The escape character + sign is used in the like predicate.
Kolusu |
|
Back to top |
|
|
tejas Beginner
Joined: 12 Mar 2003 Posts: 3 Topics: 1
|
Posted: Mon Mar 17, 2003 2:09 am Post subject: |
|
|
select DISINXCD as typeCodeNo, DISKMKMJ AS contractStatus
FROM TBRA0990
where DISINXCD in ( "+Codes+")
where codes is a java variables which contains comma separated values
for eg. after running the java file i normally
get following sql in log file
select DISINXCD as typeCodeNo, DISKMKMJ AS contractStatus
FROM TBRA0990
where DISINXCD in ( '10', '20', '30') |
|
Back to top |
|
|
gotluru Beginner
Joined: 17 Dec 2002 Posts: 29 Topics: 6
|
Posted: Tue Mar 18, 2003 11:14 am Post subject: |
|
|
Hi Teja,
Try Declaring your linkage section like this:
Code: | 01 LS-TYCD.
05 LS-TYCD-LEN PIC S9(4) COMP.
05 LS-TYCD-TXT.
15 LS-TYCD1 PIC X(01).
15 LS-TYCD2 PIC X(01).
15 LS-TYCD3 PIC X(01).
15 LS-TYCD4 PIC X(01).
15 LS-TYCD5 PIC X(16). |
bye,
Prasad |
|
Back to top |
|
|
|
|