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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a table called T1, That has

Status
Not open for further replies.

gtgren

MIS
Jan 31, 2003
116
US
I have a table called T1, That has field1, field2, field3,..
I would like to select the distinct field1, and show the other fields that go along with field1.

For example Distinct(Field1), Field2, Field3, Field4


Here is what I have, but this gives me just field1 as the result

SELECT DISTINCT [Field1]
FROM T1;


Sorry should have been more specific also

A 1 2 3 4 D
A 2 3 4 5 X
B 2 3 4 5 Y
B 2 3 4 5 Z
B 1 2 3 4 Q

I would like the distinct base on field1, because field2, field3 etc.. may not always be distinct

In other words give me the first distinct field1 and the rest of it row data. Field one is the only one that is constantly distinct in this table.


I simplified the problem though because the rest of the fields really are numeric, text, memo, and are like 45 more fields.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top