Subject Re: [firebird-support] Exept select syntax
Author Lucas Franzen
Gerhardus Geldenhuis schrieb:

> Hi
> 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.

SELECT * FROM MATERIALS M
WHERE NOT EXISTS
( SELECT 1 FROM MATERIALSCOPY C
WHERE
M.FIELD1 = C.FIELD1 OR
M.FIELD2 = C.FIELD2 )



Luc.