Re: A problem in SQL (a real challenge)
Date: 2000/05/31
Message-ID: <8h3gim$6ja$1_at_nnrp2.deja.com>#1/1
Ken Hansen, Ivy House Associates, UK.
khansen99_at_aol.com
In article <3920BF8B.540222F0_at_arcavia.com>,
kyle_at_arcavia.com wrote:
> I do not believe there is a standard SQL method
of doing this with one
> query. Here is a series of commands that will
do.
>
> RENAME TABLE <TABLE NAME> TO <TEMP TABLE NAME>;
> CREATE TABLE <TABLE NAME> AS
> SELECT
> <LIST ALL COLUMNS HERE>
> FROM
> <TEMP TABLE NAME>
> GROUPBY
> <LIST ALL COLUMNS HERE>
> ;
> DROP TABLE <TEMP TABLE NAME>;
>
> There may be a CREATE OR REPLACE command in
your version if SQL that
> replaces the need for a temp table.
>
> Why do you need only one sql statement?
>
> thought wrote:
> >
> > Suppose I have a table without a primary key
(or for that matter
> > any key). I want to delete duplicate entries
from the table
> > using a SINGLE SQL statement. Can anyone
there help me out?
> >
> > * Sent from RemarQ http://www.remarq.com The
Internet's Discussion Network *
> > The fastest and easiest way to search and
participate in Usenet - Free!
>
> --
> ------------------------------------------------
> Kyle
Lahnakoski
Arcavia Software Ltd.
> (416) 892-7784
http://www.arcavia.com
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed May 31 2000 - 00:00:00 CEST