Results 1 to 1 of 1
  1. #1
    Join Date
    Mar 2006
    Posts
    17

    Red face Unanswered: 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 06:13.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •