Thursday, February 25, 2010

Update data fromTWO tables

Update data from TWO tables:

UPDATE Business
SET Profile_City = Temp_Zipcodes.City,
Profile_State = Temp_Zipcodes.State
FROM Business, Temp_Zipcodes
WHERE
Business.Profile_Zipcode = Temp_Zipcodes.Zipcode

here business and Temp_Zipcodes are my tables.
I want to update city and state names if both the zipcodes are matched from my both tables.

No comments:

Post a Comment