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

translate a query

$
0
0
Hi,
someone can help me to translate this query to T-SQL (to run from SQL Server 2005):

UPDATE (SELECT IAMeasurement.Imes_ObjectUnit, IAImageMeasurement.Iim_Unit FROM IAMeasurement INNER JOIN IAImageMeasurement ON IAMeasurement.Imes_IDImageMeasurement = IAImageMeasurement.Iim_IDImageMeasurement) SET Imes_ObjectUnit = Iim_Unit
WHERE (Imes_ObjectUnit IS NULL) AND (LENGTH(Iim_Unit) < 6);

There is two table (IAImageMeasurement -> IAMeasurement with 1->N relation) and I would like to copy
IAImageMeasurement.Iim_Unit to its child rows in IAMeasurement with conditions of 'WHERE' clause.

Thank you,
Imre



Viewing all articles
Browse latest Browse all 23857

Trending Articles



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