Ok so I have just created a table _amazonProduct
with some columns:
ID
ProductID
ProductPrice
Now I have a product table with many columns, more than 50.
The column I want to insert is Id
from product
table into ProductID
in _amazonProduct
. All other values will be set to null.
Some things I have tried.
UPDATE [Azure_Test].[dbo].[_amazonProduct]
SET [Azure_Test].[dbo].[_amazonProduct].[ProductID] = [Azure_Test].[dbo].[Product].[Id]
FROM [Azure_Test].[dbo].[_amazonProduct]
JOIN [Azure_Test].[dbo].[Product] ON [Azure_Test].[dbo].[_amazonProduct].[ProductID] = [Azure_Test].[dbo].[Product].[Id]
Also tried:
SELECT [Azure_Test].[dbo].[Product].[Id]
INTO [Azure_Test].[dbo].[_amazonProduct].[ProductID]
FROM [Azure_Test].[dbo].[Product]
Also tried:
UPDATE [Azure_Test].[dbo].[_amazonProduct]
SET [ProductID] = (
SELECT [Id]
FROM [Azure_Test].[dbo].[Product]
)
Anyone able to help me out, not sure exactly how to go about this.
Cheers