I am excuting a call to a sp on the db2 platform (linked server) and trying to capture the result set into a temp table and display the results. The temp table is empty allthough the sp is being executed. Any clues???
create table #tempTable (o_drky char(50), o_drdl01 varchar(50))
insert into #temptable (o_drky,o_drdl01) Exec ('Call QGPL.getallcompanies') AT AS400SRV_IBMDASQL_OLEDB
select * from #temptable
Here is my sp (on db2):
create procedure get_all_companies_now
(out o_drky char(10),
out o_drdl01 char(30))
language sql
begin
declare c1 scroll cursor with return for
select drky, drdl01
from vgiprdcom/f0005
where drsy = '00' and drrt = '01';
open c1;
close c1;
end;
create table #tempTable (o_drky char(50), o_drdl01 varchar(50))
insert into #temptable (o_drky,o_drdl01) Exec ('Call QGPL.getallcompanies') AT AS400SRV_IBMDASQL_OLEDB
select * from #temptable
Here is my sp (on db2):
create procedure get_all_companies_now
(out o_drky char(10),
out o_drdl01 char(30))
language sql
begin
declare c1 scroll cursor with return for
select drky, drdl01
from vgiprdcom/f0005
where drsy = '00' and drrt = '01';
open c1;
close c1;
end;