Article View: borland.public.cppbuilder.database.ado
Article #852Re: Help with SQL statement
From: Vladimir Stefanovic
Date: Tue, 21 Jun 2005 08:41
Date: Tue, 21 Jun 2005 08:41
22 lines
1535 bytes
1535 bytes
>This depends on DBMS you are using. On MS SQL Server you may write > >insert into TblTemp (text) >select text from TblSource >group by text >order by max(id) Thank you! This worked on MS ACCESS / MDB ... >Note max(id) - there may be some id's for unique text, so you should use >aggregate function - max, min, avg etc. > >This may or may not work on DBMS other than MS SQL Server. Now, I'll try if it will work with my ADOQuery->ExecSQL() Best regards, Vladimir Stefanovic
Technical Details
Message-ID:
<42b7d2c4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42b71709@newsgroups.borland.com> <42b7c364$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,d883a75625ee119f X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Sender: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Reply-To: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Subject: Re: Help with SQL statement Newsgroups: borland.public.cppbuilder.database.ado X-User-Info: 213.137.116.231 X-Forwarded-For: 128.128.129.165 References: <42b71709@newsgroups.borland.com> <42b7c364$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <42b7d2c4$1@newsgroups.borland.com> Date: 21 Jun 2005 01:41:40 -0700 X-Trace: newsgroups.borland.com 1119343300 207.105.83.66 (21 Jun 2005 01:41:40 -0700) Lines: 25 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail