Hello all,
I'm attempting to write a query that shows when there are multiple ProjectKeys assigned to one ProjectID. This needs to be fixed down the road, but first I must identify them. Some ProjectIDs don't have a ProjectKey at all, and that's okay for now, but I don't want them to show up in the query either (hence the IS NOT NULL). What I have below returns the records where there is a one-to-one map between the fields. I don't really understand why.
SELECT [ProjectID], [ProjectKey]
FROM
WHERE ProjectKey IS NOT NULL
AND EXISTS (SELECT [ProjectID], count([ProjectID]) FROM
GROUP BY [ProjectID] HAVING count([ProjectID]) > 1);
Any help would be greatly apprecitated, as I'm a newbie with SQL, and especially in an Access environment.
Thanks,
d.
I'm attempting to write a query that shows when there are multiple ProjectKeys assigned to one ProjectID. This needs to be fixed down the road, but first I must identify them. Some ProjectIDs don't have a ProjectKey at all, and that's okay for now, but I don't want them to show up in the query either (hence the IS NOT NULL). What I have below returns the records where there is a one-to-one map between the fields. I don't really understand why.
SELECT [ProjectID], [ProjectKey]
FROM
WHERE ProjectKey IS NOT NULL
AND EXISTS (SELECT [ProjectID], count([ProjectID]) FROM
Any help would be greatly apprecitated, as I'm a newbie with SQL, and especially in an Access environment.
Thanks,
d.