Having ONE select statement for Multiple Updates
Posted: 07 Jan 2010, 10:56
Hello,
I need some advice. I would like to have one SELECT statement which allow do multiple updates for me. At the moment, I have 5 seperate updates. So id like to get it into one select statement.
For legal reasons, I wont use the actual select statement, but I will put a rough example of what I mean:
update blablabla
set a.addrrr = b.addrr
from blablabla a, metallica b
where
...
(and I have 5 of these kinds of updates...and all of the statements reading the same tables)
Any suggestion:
I need some advice. I would like to have one SELECT statement which allow do multiple updates for me. At the moment, I have 5 seperate updates. So id like to get it into one select statement.
For legal reasons, I wont use the actual select statement, but I will put a rough example of what I mean:
update blablabla
set a.addrrr = b.addrr
from blablabla a, metallica b
where
...
(and I have 5 of these kinds of updates...and all of the statements reading the same tables)
Any suggestion: