Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

update old data with new data

$
0
0
I got this script but all I get are the errors:Msg 209, Level 16, State 1, Line 8Ambiguous column name 'PartNrFabrikant'.Msg 209, Level 16, State 1, Line 8Ambiguous column name 'omschrijving'.Msg 209, Level 16, State 1, Line 8Ambiguous column name 'verkoopprijs'.Msg 116, Level 16, State 1, Line 13Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.script: UPDATE artikelen SET omschrijving = [Hofstede].[dbo].[sparepartsupdate].[omschrijving] , verkoopprijs = [Hofstede].[dbo].[sparepartsupdate].[verkoopprijs] , gewijzigd = getDate() WHERE(PartNrFabrikant in( SELECT PartNrFabrikant, omschrijving, verkoopprijs FROM artikelen AR LEFT OUTER JOIN [Hofstede].[dbo].[sparepartsupdate] SP ON AR.omschrijving != SP.omschrijving OR (AR.verkoopprijs != SP.verkoopprijs) ))

Viewing all articles
Browse latest Browse all 3145

Trending Articles