RA-00979: not a GROUP BY expression
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: RA-00979: not a GROUP BY expression

  1. #1
    Join Date
    Nov 2003
    Posts
    48

    RA-00979: not a GROUP BY expression

    SELECT OBJECT_NAME, STATUS, OBJECT_TYPE FROM ALL_OBJECTS WHERE OBJECT_TYPE <> 'VALID' GROUP BY OBJECT_TYPE
    *
    ERROR at line 1:
    ORA-00979: not a GROUP BY expression

    What's wrong?

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    your error is really:
    Code:
    SQL> l
      1  SELECT OBJECT_NAME, STATUS, OBJECT_TYPE
      2  FROM ALL_OBJECTS
      3  WHERE OBJECT_TYPE <> 'VALID'
      4* GROUP BY OBJECT_TYPE
    SQL> /
    SELECT OBJECT_NAME, STATUS, OBJECT_TYPE
           *
    ERROR at line 1:
    ORA-00979: not a GROUP BY expression
    This is telling you that "OBJECT_NAME" is not a GROUP BY expression.

    I suggest you look at the group by clause in the docs at http://tahiti.oracle.com
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Nov 2003
    Posts
    48
    I still don't understand....Please guide..
    I just want to group by object_type

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    I suggest you look at the group by clause in the docs at http://tahiti.oracle.com
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  5. #5
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Originally posted by WilliamLWY
    I still don't understand....Please guide..
    I just want to group by object_type
    What do you understand the GROUP BY clause does? You're not confusing it with ORDER BY, are you?
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  6. #6
    Join Date
    Nov 2003
    Posts
    48
    Of course not..

  7. #7
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    beat you this time fingers...
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  8. #8
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Originally posted by WilliamLWY
    Of course not..
    So if you know what GROUP BY does, you know why its wrong...
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  9. #9
    Join Date
    Nov 2003
    Posts
    48
    Still don't know

    There are several type of object_type, I just group by object_type instead of object_name. Why it say object_name not a group by expression?

  10. #10
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    I suggest you look at the group by clause in the docs at http://tahiti.oracle.com
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

Posting Permissions

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



Click Here to Expand Forum to Full Width