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

Duplicate values

Status
Not open for further replies.

celieb

Technical User
Jul 26, 2004
5
GB
I am trying to delete duplicate records from a table.

The table was created from a query which would not select all the records that I needed without these duplicates.

I am unsure of the type of joins/relationships which would have prevented these duplicates in the query.

Sorry this is a bit vague but please please help!
 
Hi

Think anyone short of god will need a little more information to help you

SQL of Query

table strucuture in brief

to start with

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Have you tried to follow the "Find duplicates" query wizard ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi

This is my code. The client can have more than one venue listed on their record in the databse so therefore duplicate records are created in the query.

I would like to say...
If the client has chosen any ONE OF the venues listed then show their record once.

SELECT InitEnq.AllocatedNumber, InitEnq.BrideForeName, InitEnq.BrideSurName, InitEnq.GroomForeName, InitEnq.GroomSurName, InitEnq.EMail, InitEnq.Email2, InitEnq.Date INTO GatestreetInvites
FROM venue INNER JOIN ((InitEnq LEFT JOIN chosenVen ON InitEnq.AllocatedNumber = chosenVen.AllocatedNumber) RIGHT JOIN SugVen ON InitEnq.AllocatedNumber = SugVen.AllocatedNumber) ON venue.Venue_id = SugVen.VenueID
WHERE (((InitEnq.Date)>#4/1/2004#) AND ((venue.VenueName)="Hartsfied Manor") AND ((chosenVen.FormSent) Is Null)) OR (((InitEnq.Date)>#4/1/2004#) AND ((venue.VenueName)="Bury court barn") AND ((chosenVen.FormSent) Is Null)) OR (((InitEnq.Date)>#4/1/2004#) AND ((venue.VenueName)="Gatestreet Barn") AND ((chosenVen.FormSent) Is Null)) OR (((InitEnq.Date)>#4/1/2004#) AND ((venue.VenueName)="Parkside School") AND ((chosenVen.FormSent) Is Null)) OR (((InitEnq.Date)>#4/1/2004#) AND ((venue.VenueName)="Manor House School") AND ((chosenVen.FormSent) Is Null));

Thankyou.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top