简体   繁体   English

从子proc中选择Sybase ASE数据

[英]Sybase ASE data selection from child proc

I have a proc named proc1 Which does many DML operations and select's a data (many records). 我有一个名为proc1的proc,它执行许多DML操作并选择一个数据(许多记录)。 Now I need to create a proc named proc2( i have to create a tamp table named #hello) and which will trigger proc1 and proc1 returns me 1000 records. 现在,我需要创建一个名为proc2的proc(我必须创建一个名为#hello的篡改表),这将触发proc1,而proc1返回1000条记录。 how can i store it into #hello table with out modifying the proc1 , as it should not changed. 我如何在不修改proc1的情况下将其存储到#hello表中,因为它不应更改。 Please help me on this.below is example 请对此提供帮助。下面是示例

create proc proc1
as 
begin
select * form table
end

create proc proc2 
as 
begin
create table #hello
exec proc1
--how will i insert proc1 data in #hello table
select * from #hello
end

Use Rob Verschoor's proxy table method: http://www.sypron.nl/proctab.html 使用Rob Verschoor的代理表方法: http : //www.sypron.nl/proctab.html

That's a bit of set-up though, which will probably need your DBA, so it might be simpler to ask for the SP to be changed. 但是,这有点设置,可能需要您的DBA,因此要求更改SP可能更简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM