aspose file tools*
The moose likes Oracle/OAS and the fly likes need help on having clause Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "need help on having clause" Watch "need help on having clause" New topic
Author

need help on having clause

Ram Korutla
Ranch Hand

Joined: Dec 24, 2007
Posts: 80
Hi

My objective is to identify records in a table where there is more than record with the same <col1,col2> combination.
Using the having clause, I can only check for one column right, how to get similar feature if I want to check on a combination
Please help

Thanks
Sridhar
Hemavathy Ramamoorthy Gopal
Greenhorn

Joined: May 13, 2008
Posts: 17
Hi Sridhar,

Please try out.

select * from table A where A.col1 = 'data' and A.col1=A.col2

or

select * from table A, table A1 where A.col1=A1.col2

Please reply with your feedback whether you meet your requirement or not.


Regards,
Hema_RG
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Something like that ?


[My Blog]
All roads lead to JavaRanch
Vinod Tiwari
Ranch Hand

Joined: Feb 06, 2008
Posts: 466
    
    1

You should use self-join.


Vinod Tiwari | Twitter | Shikshanirman | Guftgu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help on having clause