Re: syntax help - updating multiple rows
From: SpaceMarine <spacemarine_at_mailinator.com>
Date: Tue, 29 Jan 2008 11:12:50 -0800 (PST)
Message-ID: <af946757-54c3-460b-b946-1af6892ad864@d70g2000hsb.googlegroups.com>
Date: Tue, 29 Jan 2008 11:12:50 -0800 (PST)
Message-ID: <af946757-54c3-460b-b946-1af6892ad864@d70g2000hsb.googlegroups.com>
On Jan 29, 12:44 pm, Frank van Bortel <frank.van.bor..._at_gmail.com>
wrote:
> Not sure what you mean by "my desired column values";
> do you supply these, or are these from the table?
thanks, frank. put simpler what i mean is, "i want to update target rows w/ values from source rows". so i want to run a query that returns a set of source rows. then, i want to update some target rows (that exist in this same table) w/ the values of the source rows.
id bet this is standard/simple, but i just dont know how. i found one solution:
- get resultset of source rows; place into CURSOR
- loop each row of source rows
- run UPDATE statements onto target row, using loop-row's values.
...that could work. but i think theres probably a way to do it into a single statement.
see what i mean?
sm Received on Tue Jan 29 2008 - 13:12:50 CST