What’s wrong with my query, I want to copy three columns to another server\table if one of the column (ID_DIRCT) is not null :
INSERT INTO System\Syst3.Server1.dbo.TABLE_RESRC (NO_EMPLY,PR,NM_FAML,CO_DIRCT)
SELECT NO_EMPLY, PR_EMPLY, NM_EMPLY, ID_DIRCT
FROM System\Syst3.Server2.dbo.RESRC
WHERE System\Syst3.Server2.dbo.RESRC.ID_DIRCT IS NOT NULL
Using SQL Server 2008 R2.
Thanks.
You don’t state wether you are getting an error, or wrong results or anything like that, you don’t even say what RDBMS you are using. So, an educated guess of what’s wrong with your query is that you are not using quotes to call your linked server (it needs them because of some special chars in the name of the linked server):