Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Update inner join

$
0
0

Hi, all

I am a newbie to this. Any help is greatly appreciated. I have 2 tables. Copy and Serial. I want to update PONumber when CopyID matches in the 2 tables. So the end result would be CopyID 236059 and PONumber is XYZ123.

CopyID,PONumber                                                                                                                                                                    

236059,NULL

236060,NULL

CopyID,Serial

236059,XYZ123

236060,XYZ122

When I run the following script, it didn't update.

Update dbo.copy

set dbo.copy.PONumber = dbo.Serial.Serial

From dbo.Copy

inner join dbo.serial on dbo.copy.copyID = dbo.serial.CopyID


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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