I have a linked server set up to a db2 data base. We are running MS Sequel Server 2005.
1. If I run the following everything works fine and resulset is displayed:
Exec ('Call QGPL.get_companies (?,?)', o_drky, o_drdl01) AT AS400SRV_MSDASQL
2. When I try to get the result into a temp table the query is just running and never stops. I manually have to abort. Any ideas?
drop table #temptable
create table #tempTable (o_drky char(10), o_drdl01 char(50))
insert into #temptable (o_drky, o_drdl01) Exec ('Call QGPL.get_companies (?,?)', o_drky, o_drdl01) AT AS400SRV_MSDASQL
select * from #temptable
1. If I run the following everything works fine and resulset is displayed:
Exec ('Call QGPL.get_companies (?,?)', o_drky, o_drdl01) AT AS400SRV_MSDASQL
2. When I try to get the result into a temp table the query is just running and never stops. I manually have to abort. Any ideas?
drop table #temptable
create table #tempTable (o_drky char(10), o_drdl01 char(50))
insert into #temptable (o_drky, o_drdl01) Exec ('Call QGPL.get_companies (?,?)', o_drky, o_drdl01) AT AS400SRV_MSDASQL
select * from #temptable