0
SELECT dbo.ProductType.Id
FROM dbo.ProductType 
INNER JOIN dbo.RawProduct ON dbo.ProductType.SourceId = dbo.RawProduct.ProductTypeId

Looking to take this SELECT and use it to do an update on a separate table called dbo.Product and update the column ProductTypeID

Tom
  • 7,640
  • 1
  • 23
  • 47
  • You can use [MERGE Statement](http://msdn.microsoft.com/en-us/library/bb510625.aspx) from SQL Server 2008. And please read this article: http://stackoverflow.com/help/how-to-ask – Pred Jul 29 '14 at 13:48
  • 2
    What is the relationship between Product and ProductType tables please – Gouri Shankar Aechoor Jul 29 '14 at 13:51
  • Id in ProductType Table is associated with ProductId in Product table – Charles Range Jul 29 '14 at 14:05
  • 1
    possible duplicate of [UPDATE from SELECT using SQL Server](http://stackoverflow.com/questions/2334712/update-from-select-using-sql-server) – AdamL Jul 29 '14 at 14:32

0 Answers0