-
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?
-
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
-
I still don't understand....Please guide..
I just want to group by object_type
-
I suggest you look at the group by clause in the docs at http://tahiti.oracle.com
Jeff Hunter
-
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?
-
-
beat you this time fingers...
Jeff Hunter
-
Originally posted by WilliamLWY
Of course not..
So if you know what GROUP BY does, you know why its wrong...
Jeff Hunter
-
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?
-
I suggest you look at the group by clause in the docs at http://tahiti.oracle.com
Jeff Hunter
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|