Re: Boolean complement of a pair of OR clause
Posted in 1997
Jacob Salomon wrote:
>
> WOW! That sounds like an esoteric topic!
>
> I have data in a temp table ready to be inserted into a main table.
> However, the main table has two columns, each of which must remain
> unique. (So why don't my users allow me to create uniqueness
[SNIP]
>
> Does someone have a large table thaey can test this kind of logic
> against?
I'll look into it. In the meantime remember Kagel's First Law of SQL?
Try deleting from t2 all duplicates in two separate operations then you
can insert the survivors:
delete from t2 where number in (select number from t1);
delete from t2 where name in (select name from t1);
insert into t1 select * from t2;
Art S. Kagel
Kagel's First Law of SQL:
There are at least three ways to do ANYTHING in SQL.
First Correllary to Kagel's First Law of SQL:
If you have not found all three you may not be doing it the
best way.