Delete Query - guidance

dntel123

Registered User.
Local time
Today, 13:16
Joined
Feb 23, 2007
Messages
35
Hi Guys,

I have two large csv files that Excel can't fully open so I merged them together using CMD copy *.csv (the files have identical headers so this should be fine).

I opened them in access because what I want to achieve getting the unique values into one table.

So I made a query and I think I have done it correctly but I want to check as it's important. So from this one file I want the unique values is this correct?

Code:
SELECT First(Compare.[Email]) AS [Email Field], Count(Compare.[Email]) AS NumberOfDups
FROM Compare
GROUP BY Compare.[Email]
HAVING (((Count(Compare.[Email]))>1));
It's made a query which I tried to export as CSV which failed for the silly reason of the clipboard only being able to hold 65k records so thats annoying. If anyone knows how to get round that that would help too :D

Thanks,
Liam
 
1st, that query will only return email addresses with duplicates. If an email only appears once in the underlying dataset it will not appear when you run that query. To show all unique emails this is the query you would want:

SELECT Email FROM Compare GROUP BY Email;

2nd, what's so special about viewing the data in a .csv file? I understand if your using the .csv file to send to a mailing company or to load into another system, but why do you need to open it up and see all the data specifically in a .csv file?
 

Users who are viewing this thread

Back
Top Bottom