Update all records in one column with data from the first record in another table

I am  looking to update all the rows of one column in a table with the value in a the first row in a seperate table.
I have tried
UPDATE       InputGlobalFeed
SET                IGFMerchantName = AWHeader.AWMerchantName
FROM            AWHeader CROSS JOIN

But this updates IGFMerchantName from  InputGlobalFeed with various record from AWHeader and not just AWMerchantName.
Many thanks
Simon CrippsOwnerAsked:
Who is Participating?
Try this query

UPDATE InputGlobalFeed
SET IGFMerchantName = (SELECT TOP 1 AWMerchantName FROM AWHeader)
try this
SET T1.IGFMerchantName = T2.AWMerchantName
FROM InputGlobalFeed T1,
	(SELECT TOP 1 AWMerchantName FROM AWHeader) T2

Open in new window

Simon CrippsOwnerAuthor Commented:
many thanks Sunithnair, thought it was something like this but just could not nail it. Cheers
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.