SELECT STATEMENT HELP PLEASE   Independent houses near kukatpally | Apartments in Pragathi Nagar | AndhraVaani.com | Log Out | Topics | Search
Register | Edit Profile

Bewarse TalkArchives - 2006Bewarse Bewarse BewarseArchive through February 10, 2006 � SELECT STATEMENT HELP PLEASE Previous Next

Author Message
Top of pagePrevious messageNext messageBottom of pageLink to this message

Penkonda_tiger
Bewarse
Username: Penkonda_tiger

Post Number: 1321
Registered: 06-2005
Posted From: 62.234.167.180
Posted on Thursday, February 09, 2006 - 3:48 pm:Edit PostDelete PostView Post/Check IP

select PREMISE, Count(PREMISE) from TABLE
Group by PREMISE having Count(*) > 1

something like that in oracle
Top of pagePrevious messageNext messageBottom of pageLink to this message

Teluguabbai
Pilla Bewarse
Username: Teluguabbai

Post Number: 19
Registered: 07-2004
Posted From: 198.252.245.194
Posted on Thursday, February 09, 2006 - 3:28 pm:Edit PostDelete PostView Post/Check IP

I HAVE A SERVICE TABLE WITH COLUMNS PREMISE# AND SERVICE#. EACH PREMISE# MAY HAVE 1 OR MORE SERVICE#'S, SO PREMISE# IS NOT UNIQUE THOUGH OUT THE TABLE. I WANT RECORDS FROM THE TABLE WHERE THE PREMISES HAS 1 OR MORE SERVICE#.
PREMISE# SERVICE#
123456 100
123456 200
123457 200
123458 100
FOR EXAMPLE, FROM ABOVE I NEED ONLY PREMISE# WITH SERVICE# 100 AND 200, SO THE SELECT STATEMENT SHOULD RETURN PREMISE# 123456 RECORD
Where is Rain without Storm? Where is LIfe without Problems?