This always works for me:

SELECT po,line, count(po) as test from table group by po, line having test > 1

You may not need the "as" for your db.

Good luck!

Larry

>>> [EMAIL PROTECTED] 06/01/00 10:21AM >>>
Im trying to create a primary key and cannot because I have a few duplicate
entries.  There should not be any so I am trying to find them.  The key
consists of 2 fields(po,line), Im trying to run a query that will only
display the duplicates, this is what Im trying.

SELECT po,line from table where po = po AND line = line

how can I change this so it only display's the duplicate entries?


------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to