October 11, 2007 at 8:41 pm
My linked server is a DB2\Linux. I'm calling a stored procedure on it from SQL Analyzer like this:
EXEC [DB0004]..[DB2INST1].[SP_ITM_UPDATE_TIME]
I get the result I expect, which looks like this:
Boat ID
0000471008233
0000471009005
My problem is that when I try to use INSERT INTO this result into a table the INSERT INTO I get "incorrect syntax". Any ideas?
Thanks...Nali
October 12, 2007 at 5:26 am
i believe that the results from a stored procedure must go into an existing table; ie:
create table #results(boatid varchar(30) ,otherstuff varchar(30))
insert into #results(boatid)
EXEC [DB0004]..[DB2INST1].[SP_ITM_UPDATE_TIME]
that should work;
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply