Subject | Re: [firebird-support] Exept select syntax |
---|---|
Author | Lucas Franzen |
Post date | 2003-11-13T12:20:55Z |
Gerhardus Geldenhuis schrieb:
WHERE NOT EXISTS
( SELECT 1 FROM MATERIALSCOPY C
WHERE
M.FIELD1 = C.FIELD1 OR
M.FIELD2 = C.FIELD2 )
Luc.
> HiSELECT * FROM MATERIALS M
> Is there a way to achieve a similar result as the this query with
> firebird?
>
> SELECT * FROM Materials EXCEPT SELECT * FROM MaterialsCopy
>
> I did manage to get something similar with a join and a where statement
> that compares every field but that is big and unsightly queries.
> eg
> select
> table1
> table2
> left join table 1 on table2
> where
> t1.field1<>t2.field1 or
> t1.field2<>t2.field2
> etc.
WHERE NOT EXISTS
( SELECT 1 FROM MATERIALSCOPY C
WHERE
M.FIELD1 = C.FIELD1 OR
M.FIELD2 = C.FIELD2 )
Luc.