I want to insert multiple records from my local SQL Server to an remote AS400 server through a Linked Server. I already have this accomplished with OPENQUERY and/or Four Part Name syntex. But it is too slow so I want to use EXECUTE AT syntex to move the load to the Remote AS400 server.
Now I know the EXECUTE AT syntex will go something like:
EXECUTE ('INSERT INTO [REMOTESERVER] (c1,c2...) SELECT c1,c2... FROM [LOCALSERVER] ') AT [LINKEDSERVER]
now, how do i qualify the [LOCALSERVER] so that the as400 remote server can get at the data on my localserver, bottom line how do i pass the local records in this way. I know how to do it for a single record using the VALUES syntex.