If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > my select max doesn't work

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-15-06, 05:01
fab01 fab01 is offline
Registered User
 
Join Date: Mar 2006
Posts: 17
Red face my select max doesn't work

(DB2 V7, embbeded sql in cobol, mainframe)
Hi !
I'm quite a newbie in sql and when i do this request, at the compilation, i have an error.
EXEC SQL SELECT MAX(ASNMEMO_SEQUENCE)
INTO :ASNMEMO-SEQUENCE
FROM TASNMEMO
WHERE ASNMEMO_UG = :ASNMEMO-UG
ASNMEMO_CIE = :ASNMEMO-CIE
ASNMEMO_NUMSIN = :ASNMEMO-NUMSIN
END-EXEC
the error message is
326 COL 31 ILLEGAL SYMBOL "ASNMEMO_CIE". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: UNION
326 COL 46 "SELECT" REQUIRED
326 COL 46 ILLEGAL SYMBOL "=". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: SELECT

I try to swap the two lines
INTO :ASNMEMO-SEQUENCE
FROM TASNMEMO
by
FROM TASNMEMO
INTO :ASNMEMO-SEQUENCE
but it doesn't work too

Any help would be useful !!
Cheers
Merci



SORRY I FOUND MY MISTAKE:::
BECAUSE I FORGET THE WORD AND ON MY CLAUSE WHERE
SORRY !!!!! (i don't know how to delete the thread

Last edited by fab01; 05-15-06 at 05:13.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On