Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Using columns from main query to subquery

$
0
0

Hello,

here is my SQL statement which is working in most RDBMS bu SQL Serever, is there some solution to pass column value from main query to subquery like it is show in my sample down???

UPDATE abc.Products P SET P.ProductName = (SELECT T.Txt02 FROM tmp.TempTable T WHERE T.Txt01 = P.SKU)

Thanks in advance...


Viewing all articles
Browse latest Browse all 8428

Trending Articles



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