This more straight ahead version also works for Oracle:
UPDATE MyTable t1
SET Foo = 1
WHERE Bar = 99
AND NOT EXISTS
(
SELECT *
FROM MyOtherTable t2
WHERE t2.SomeColumn = t1.SomeColumn
AND t2.SomeOtherColumn = t1.SomeOtherColumn
AND t2.YetAnotherColumn = 42
)
Still no ideas for MySQL.
Dave
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338715
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm