Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distinct Rows

Status
Not open for further replies.

adimulam

Programmer
Feb 13, 2002
25
US
Hi,
I have a table with 10 columns. One of them is a Signature column. The table has 100 rows and but there are only 5 different signature values. I want to extract the data in such a way that the resultset has 5 rows (with all colums) and each row has a different signature. Please help!!!

 
select Signature
, min(col2)
, min(col3)
, min(col4)
, min(col5)
, min(col6)
, min(col7)
, min(col8)
, min(col9)
, min(col10)
from yourtable
group
by Signature

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top