dba321
Hall of Fame
Points: 3917
More actions
April 5, 2006 at 3:39 pm
#168436
I have 2 tables, trying to update and replace the status in one with the other based on master.number match
UPDATE master m
set m.status = (SELECT status from masterbackup where number = m.number )
FROM mastermasterbackup
noeld
SSC Guru
Points: 96590
April 5, 2006 at 3:56 pm
#631113
UPDATE m
set status = mb.status
FROM master m
join mastermasterbackup mb
on m.number = mb.number
* Noel
Daniela-267581
Ten Centuries
Points: 1119
April 6, 2006 at 5:23 am
#631170
you also could use a trigger to do that
Daniela
April 6, 2006 at 6:17 am
#631188
right on...thanks!
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply