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

Need help with SQL SELECT Statement

Status
Not open for further replies.

TSO456

Technical User
Jul 23, 2001
57
US
Please help

I have a table in Access that has multiple columns with duplicate numbers in one column. I want a query that captures all records and coulmns with out getting the duplicates listed in one of the columns.

Thank you
 

You can use various aggregate functions.

Example: Choose first occurrence of duplicated column
Select Col1, Col2, FIRST(Col3) As Col3A, Col4
From Table
Group By Col1, Col2, Col4

You could use LAST to get the last value, MIN to get the minimum value or MAX to get the maximum value of the duplciated column.

I suggest that future postings about Access be made in one of the Access forums. This forum focuses on ANSI standard SQL which Access isn't! Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time.
NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top