|
 |
access_asp thread: Query to display row occurrences of ID in table
Message #1 by "Blossom" <bmathew1@s...> on Wed, 10 Apr 2002 22:48:57
|
|
Hi everyone!
I am trying to write a query to display all records in the Registration
table in which contact Id appears in more than one row. I am not that
familiar with SQL and would appreciate it if someone can help me with the
logic behind this.
Thanks,
Blossom
Message #2 by "Rob Parkhouse" <rparkhouse@o...> on Thu, 11 Apr 2002 00:38:19
|
|
Try something like this
SELECT ContactId, Count(ContactId) AS X
FROM tablename
GROUP BY ContactId
HAVING Count(ContactId)>1
> Hi everyone!
> I am trying to write a query to display all records in the Registration
t> able in which contact Id appears in more than one row. I am not that
f> amiliar with SQL and would appreciate it if someone can help me with
the
l> ogic behind this.
> Thanks,
> Blossom
|
|
 |