Article View: borland.public.cppbuilder.database.ado
Article #882Re: How to find duplicated values
From: Viatcheslav V. Vassiliev
Date: Tue, 22 Feb 2005 21:07
Date: Tue, 22 Feb 2005 21:07
48 lines
2259 bytes
2259 bytes
This should work, at least from ADO - Jet supports subqueries: select * from (select MyText, count(MyText) as c from SomeTable group by lang1_MyText) where c > 1 Note also that Counter is reserved work and should be enclosed in brackets - [Counter]. //------------------------------------------ Regards, Vassiliev V. V. http://www.managed-vcl.com - using .Net objects in Delphi for Win32 + ADO.Net http://www.oledbdirect.com - The fastest way to access MS SQL Server, MS Jet (Access) and Interbase (through OLEDB) "Vladimir Stefanovic" <antivari@po.sbb.co.yu> �������/�������� � �������� ���������: news:421b7242$2@newsgroups.borland.com... >I have a table (MS ACCESS) with 2 fields: > > 1 field: MyText (TEXT) > 2 field: MyBool (BOOL) > > ...which both should make a primary key, but first I > have somehow to get rid of duplicates: > > I need an SQL which can find duplicates for me by > any of those tools: SQL Explorer, MS Access Query or > BCB6&ADOQuery. > > Also why this do not work with any of the tools mentioned: > > // This is only for a single field, not for both > select MyText, count(MyText) as Counter > from SomeTable > group by MyText > where Counter>1 > > > > -- > Best regards, > Vladimir Stefanovic >
Technical Details
Message-ID:
<421b9f2e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<421b7242$2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,acc64c952c569a2b X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <421b7242$2@newsgroups.borland.com> Subject: Re: How to find duplicated values Date: Wed, 23 Feb 2005 00:07:59 +0300 Lines: 50 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 85.93.137.42 Message-ID: <421b9f2e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1109106478 85.93.137.42 (22 Feb 2005 13:07:58 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail