Straight off the top of my head without testing try: select id from file1 where id in ; (select id, count(*) as idcount from file1 group by 1 having idcount > 1)
Not a good idea to use reserved words as variable names, also use variable name in having clause not another count. John Weller 01380 723235 07976 393631 > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Garry Bettle > Sent: 18 December 2006 14:33 > To: [EMAIL PROTECTED] > Subject: Quick Duplicate check ... > > > Howdy, > > Hope you all had a good weekend. > > I'm trying to do a quick reality check for duplicates: > > select id from file1 where id in ; > (select id, count(*) as count from file1 group by 1 having count(*) > 1) > > but the above only gives me "SQL: Subquery is invalid." error. Grrrr. > > Any ideas? > > Cheers, > > Garry > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

