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

Add row number to query output

Status
Not open for further replies.

HEMASUR

Technical User
Jun 3, 2005
28
US
I have a query that outputs duplicate records in a database, based on DOB and customer number. Due to data entry errors the same customer could have duplicate records, I need to print out this list out so that the names in the database can be fixed. I want to insert an index number to the customer number showing the number of records against the customer.

DOB ID LName FName
11/21/1910 33489 YURK LARRY
11/21/1910 33489 YARK LARRY
8/1/1912 46225 PALAZZOLO ANDY
8/1/1912 46225 PALAZZOLO ANDDY
12/15/1913 56769 SAUCEDO ERIC
12/15/1913 56769 SAUSEDO EIRC
12/15/1913 56769 SAUSEDO RIC

Printout
Index DOB ID LName FName
1 11/21/1910 33489 YURK LARRY
2 11/21/1910 33489 YARK LARRY
1 8/1/1912 46225 PALAZZOLO ANDY
2 8/1/1912 46225 PALAZZOLO ANDDY
1 12/15/1913 56769 SAUCEDO ERIC
2 12/15/1913 56769 SAUSEDO EIRC
3 12/15/1913 56769 SAUSEDO RIC

Is it possible to do this through a function, or a simple sql or vb statement.
Thanks to anyone who can help me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top