Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    6

    Angry Unanswered: ORA-00933: SQL command not properly ended

    Please, what I forget?

    Thanks, Reddy

    select distinct invmess.mesline as Sprava from edi_log, invmess
    where eloinid = mesinvid
    and elomesn = mesnum
    and elocnuf = 45192901
    and elodate = trunc(sysdate)
    and (elostat= 1 or elostat=2)
    order by mesnum, mesord
    group by invmess.mesline

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    "Order By" is required to be the final statement if used.
    Last edited by r123456; 01-27-04 at 10:15.
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >group by invmess.mesline
    Try
    group by invmess.mesline;
    or
    group by invmess.mesline
    /

  4. #4
    Join Date
    Jan 2004
    Posts
    6
    Originally posted by r123456
    "Order By" is required to be the final statement.
    But if I change sentence of "order by" after "group by", I see "ORA-00905: missing keyword". But I can't it put in select, because I want select without this two fields.

  5. #5
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    You cannot ORDER BY columns that are not projected at the current level.

    Valid:
    Select a, sum(b)
    from table
    group by a
    order by a

    Invalid:
    order by a, b
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

Posting Permissions

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