Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Update one column of a table with data from another table Expand / Collapse
Author
Message
Posted Wednesday, March 20, 2013 8:00 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, December 17, 2013 4:56 AM
Points: 592, Visits: 753
Hi,

Try this one


UPDATE bck
SET bck.ProcID = ori.ProcID
FROM dbo.BlogCopy_copy as bck inner join dbo.BlogProcedures as ori
on bck.WebID=ori.WebID



Using aliasses of tables is a good habit that you really should learn to use

Wkr,
Van Heghe Eddy
Post #1433230
Posted Wednesday, March 20, 2013 8:38 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, April 11, 2014 9:33 PM
Points: 3, Visits: 16
Thanks for the tip - I did manage to find out why it did not work, I needed to use an additional "WHERE" qualifier.

I also agree with the alias suggestion, but my main platform for development is web based and I use DreamWeaver for that. Using aliases tends to mess with the built in SQL builder, so I have never really spent too much time getting to use aliases.

Thanks
Hans
Post #1433563
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse