Bill Crawley
October 26th, 2007, 08:20 AM
Update [image] set Active = 1 where
exists( select * from dwellingimage as d
right join [image] as i on
i.id = d.imageid
where imageid is null)
My Select statement above selects the correct number of records, but when I add the Update command it goes and update's the whole table. Can someone tell me how I should change it so that only those records in the select statement are updated.
exists( select * from dwellingimage as d
right join [image] as i on
i.id = d.imageid
where imageid is null)
My Select statement above selects the correct number of records, but when I add the Update command it goes and update's the whole table. Can someone tell me how I should change it so that only those records in the select statement are updated.