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
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: 2 days ago @ 5:35 AM
Points: 647, Visits: 764
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: Tuesday, August 5, 2014 9:38 PM
Points: 3, Visits: 17
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