Phil Parkin (10/23/2016)
You've just found a pretty good example of why SELECT * is often regarded as bad practice.Usually, I would suggest that you specify all of the column names explicitly. But in this case, the shortcut is changing this line
SELECT * FROM [NLDSLASSQLTST].[CS_ConversieAanlevering].[dbo].[MULTIMED_INHOUD] AS ca
to this
SELECT ca.* FROM [NLDSLASSQLTST].[CS_ConversieAanlevering].[dbo].[MULTIMED_INHOUD] AS ca
Qualify the * with the source table alias and it will no longer mean that columns from the temp table are being included in the SELECT.
Thank you again! Yes, I knew it is bad practice but it was stronger than me 😉 Learned my lesson I guess 🙂
Unfortunately I ran into another message which is (I guess) of some whoel other kind: The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server "P2WIDB002" was unable to begin a distributed transaction.
Destination server is a linked server over VPN tunnel. But it worked fine before.
I found some info on it but it probably has to do with the server config, so I need to see our sysadmin. On the remote linked server we cannot administer anything...