Right now we have a stored procedure in another server ("A") that we are using in a visual studio job to populate a table in our sql server. Instead of having that stored procedure in server "A," I am moving it to our current sql server
but I am having some syntax errors and I can't seem to figure them out. I know that the servers use different syntax but for the most part it's mostly the same. So now I am trying to use just Transact-SQL to build this stored procedure
in our sql2005 database - any help would be greatly appreciated!
I am using the command "openquery" to select the fields that I need from the linked server. Here is the stored procedure: