I'm sure that this is really simply... I'm timing out when alternating
between <ahhh> brain freeze </ahhh> and <ahhh> max complicated </ahhh>
Many thanks,
Jonathan
or
INSERT INTO A (x, y)
SELECT x, y
FROM B
WHERE NOT EXISTS(SELECT *
FROM A
WHERE A.x = B.x
AND A.y = B.y);
--
Plamen Ratchev
http://www.SQLStudio.com
Is here a UNIQUE (x, y) on table A? Then it will not happen. Think
constraints before code!!
The UNIQUE guarantees no bad thing will happen. You'll still need a query to
ensure good things happen, though.
--
J.