Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Update Table

$
0
0

Hi, 

I am trying to add in a new variable from one table into another and the way I am trying to do this is by joining the 2 tables. 

The logic I have below is exactly the final table output I need but what I am struggling with, is updating the existing table with this logic. 

I have tried using 

UPDATE [SW].[dbo].[TERS]

but this doesn't seem to work so my guess is, I am missing something, just not sure what. Anyone able to help please?

The table I need updating is called: [SW].[dbo].[TERS]

select a.*,
b.[DATO]
from [SW].[dbo].[TERS] as a
inner join [SW].[dbo].[SupFile] as b
on a.[ID] = b.[ID]



Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>