Hi guys, I have a table [20120627CSV] with 200k records in it and a Column called Group.
I need to delete all records that do not belong to more than one group.
e.g.
Name | Date | Group
---------------------
Record1 | date | 1
Record2 | date | 1
Record3 | date | 2
Record4 | date | 3
Record5 | date | 3
Record6 | date | 4
so I have a query:
SELECT First([20120627CSV].Group) AS FirstOfGroup FROM 20120627CSV GROUP BY [20120627CSV].Group HAVING (((Count([20120627CSV].Group))=1));
which correctly returns Record3 and Record6
Now I need to create a Delete query that would delete Record3 and Record6 in this scenario. I feel like I've tried everything but fear I am overlooking the obvious from staring at it too long.
Advice?
Cheers,
Chris
"Illegitimis non carborundum"
(don't let the b@st@rds get you down)
I need to delete all records that do not belong to more than one group.
e.g.
Name | Date | Group
---------------------
Record1 | date | 1
Record2 | date | 1
Record3 | date | 2
Record4 | date | 3
Record5 | date | 3
Record6 | date | 4
so I have a query:
SELECT First([20120627CSV].Group) AS FirstOfGroup FROM 20120627CSV GROUP BY [20120627CSV].Group HAVING (((Count([20120627CSV].Group))=1));
which correctly returns Record3 and Record6
Now I need to create a Delete query that would delete Record3 and Record6 in this scenario. I feel like I've tried everything but fear I am overlooking the obvious from staring at it too long.
Advice?
Cheers,
Chris
"Illegitimis non carborundum"
(don't let the b@st@rds get you down)