Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

how can I update a sql table based upon data in a different sql table

$
0
0

I am running SQL Server 2008. I am looking for a way to update data in one table from another table. I have a Material table which has many columns in it. I want to match to a second table using the Part Number field to match Table1 to Table2. Then I want to set the SellingPrice in Table1 to the SellingPrice in Table2. Then I want to set the Description in Table1 to the Description in Table2. Then I want to set the ExtendedDescription in Table1 to the ExtendedDescription in Table2. I may not have a matching record in Table2.

Please provide an example of code to make this work.

Thanks


Viewing all articles
Browse latest Browse all 4871

Trending Articles



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