Re: Please help on SQL
From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1998/03/26
Message-ID: <6fdl06$bq2$2_at_news01.btx.dtag.de>#1/1
Date: 1998/03/26
Message-ID: <6fdl06$bq2$2_at_news01.btx.dtag.de>#1/1
On Wed, 25 Mar 1998 22:09:18 -0000, "Burnett" <burnett_at_burnettms.demon.co.uk> wrote: Hi,
think you where too restrictive.
What's about
SELECT DISTINCT foo1.a, foo1.b
FROM foo f1,
foo f2 WHERE (f001.a = f002.a AND f001.rowid != f002.rowid /* To prevent rows mathing themselves */) OR (f001.b = f002.b AND f001.rowid != f002.rowid /* To prevent rows mathing themselves */)
>Try;
>
>SELECT DISTINCT foo1.a, foo1.b
>FROM foo f1,
> foo f2
>WHERE
> f001.a = f002.a AND
> f001.b = f002.b AND
> f001.rowid != f002.rowid /* To prevent rows mathing them
>selves */
>
>The statement reads (in English)
>
>Select foo column a and foo column b from foo where there is another row
>with an itdntial value of in column a and column b.
>
>
-- Regards Matthias Gresz :-) GreMa_at_T-online.deReceived on Thu Mar 26 1998 - 00:00:00 CET