Originally posted by SANJAY_G
Abhay,
HAVING clause is used with GROUP BY clause and in the syntex it should be after GROUP BY.
Thas Correct sanjay but i think after 7i it should not be a case...
Our PRO is 8i.
Its irrelevent where ever u have Having clause, result shud be same...
PS below from TEST DB (8i)
Code:
SQL> select * from tabl;
ID
--------------------
1
1
2
2
5
7
6 rows selected.
SQL> select id,count(1) from tabl having count(1)> 1 group by id;
ID COUNT(1)
-------------------- --------------------
1 2
2 2
SQL> select id,count(1) from tabl group by id having count(1)> 1;
ID COUNT(1)
-------------------- --------------------
1 2
2 2
Thanks
Abhay.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"