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!

distinct in query

Status
Not open for further replies.

eshaan

Technical User
Feb 20, 2003
57
US
I converted database from text file to temporary access table. I want to append data from temporary table to original table. In temporary file every record got another duplicate data.

My orginal tables are Employee info table and Employee details table. When I append from temporary file to Empoyee info table it is appending duplicate records also. Like 1 record JOHNs is sick 2 record JOHN is in vacation. I need to append JOHN name only one time in Employee info table.How can i eliminate these duplicate records. Distinct is not working.

Help me.
 
There are a few ways to solve this problem.

1. In the table set your field ("John") to be Indexed: Yes (No Duplicates) - remode the duplicate data first.

2. Create an sql statement like this:
SELECT John
FROM YrTableName
GROUP BY John

Herman

They say that crime doesn't pay... does that mean my job is a crime?
 
Hermanlaksko said it right, JOHNs is sick 2 record JOHN is in vacation is treated as 2 seperate records because in reality they are not unique, making JOHN unique will allow you to have multiple status for him.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top