hey all,
i have a 2 table join select statement that i would like to turn into an
update statement? is this possible?
thanks,
rodcharPlease post DDL and DML statements in order to understand better you request
.
--
Current location: Alicante (ES)
"rodchar" wrote:
> hey all,
> i have a 2 table join select statement that i would like to turn into an
> update statement? is this possible?
> thanks,
> rodchar|||I normally do it using aliases, like so:
-- SELECT version
SELECT *
FROM TableA a
INNER JOIN TableB b ON a.key_field = b.key_field
-- UPDATE version
UPDATE a
SET a.update_field = b.update_field
FROM TableA a
INNER JOIN TableB b ON a.key_field = b.key_field
Let me know how you get on.
Damien
"rodchar" wrote:
> hey all,
> i have a 2 table join select statement that i would like to turn into an
> update statement? is this possible?
> thanks,
> rodchar|||thank you everyone. this helped.
rodchar
"rodchar" wrote:
> hey all,
> i have a 2 table join select statement that i would like to turn into an
> update statement? is this possible?
> thanks,
> rodchar
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment