从另一个存储过程中调用SYBASE存储过程,而不显示“存储过程”结果
我正在从另一个存储过程y中调用Sybase存储的过程X。对类似问题的答案,我创建了一个#TMP_Table来保留存储过程X的结果。
create table #tmp_table(
col1 int,
col2 varchar(100),
...
) exec sp_stored_procedureX 888, 'Parameter2', ...
select * from #tmp_table
以上成功将存储过程X的结果加载到#TMP_Table中,但它显示了两次存储过程X的结果。我猜第一个来自“ Exec sp_stored_procedurex ...”部分,第二个部分来自我想的“ select * * select *”。我不想显示第一个“ EXEC SP_STORED_PROCEDUREX ...”部分中的结果。如何将数据存储到#TMP_Table而不显示的情况下?
如果需要更多澄清/信息,请让我知道。
谢谢问候,
京都
I am calling a Sybase stored procedure X from another stored procedure Y. Following the answer to a similar question , I create a #tmp_table to hold the results from stored procedure X.
create table #tmp_table(
col1 int,
col2 varchar(100),
...
) exec sp_stored_procedureX 888, 'Parameter2', ...
select * from #tmp_table
The above successfully loads stored procedure X's results into #tmp_table but it shows the results of stored procedure X twice. I guess the first one is from "exec sp_stored_procedureX ..." part and the second one is from "select * from #tmp_table" which I intended. I don't want to display the results from the first "exec sp_stored_procedureX ..." part. How can I store data to #tmp_table without displaying it?
Please kindly let me know if more clarification/information is needed.
Thanks & Regards,
Kyoto
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的语法对于ASE中的普通表不正确。但是对于ASE,有一个特殊的表名称RPC表可以将过程的输出映射到表格式输出。也许这就是您要寻找的...也可以从远程ASE调用。
这是一个样本 -
your syntax is incorrect for normal table in ASE. But for ASE, there's a special table name RPC table can map the output of procedure to a table format output. Maybe that's what you are looking for...And that also can be called from remote ASE.
Here's a sample --