IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Error during DB2 compilation SQLSTATE=42601


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dineshsjce
Currently Banned

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Fri Jun 15, 2007 1:37 pm
Reply with quote

Hi I got the following error while compiling a DB2 program . What is the solution ?

An unexpected token "UNION SELECT
'Y' " was found following "FF_DT > CURRENT
DATE". Expected tokens may include: "<space>".
SQLSTATE=42601

AND
my query looks like this

SELECT 'Y'
INTO :WS-FUTURE-EXIST-SW
FROM CON01_CUST_CNTCT
WHERE
AID_CD = :WS-AID-CD-ONLY
AND CNTCT_EFF_DT > CURRENT DATE
UNION
SELECT 'Y'
INTO :WS-FUTURE-EXIST-SW
FROM CON01_CUST_CNTCT
WHERE
AID_CD = :WS-AID-CD-COMP
AND CNTCT_EFF_DT > CURRENT DATE
Back to top
View user's profile Send private message
priyamnavada

New User


Joined: 24 Dec 2005
Posts: 52
Location: hyderabad

PostPosted: Tue Jun 19, 2007 8:00 pm
Reply with quote

i think declarion of WS-AID-CD-COMP was not done properly.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top