存储过程procA
存储过程procBprocA
{
[Data]=exec(procA)
...Data处理
}
这个数据集Data怎么得到

解决方案 »

  1.   

    declare @myTable table(columnlist)
    set @myTable=exec(ProcB)
    ''这儿你可以像操作一般数据表一样操作@myTabel
      

  2.   

    大概是这么用:
    declare @aa int
    exec procB @aa output
    select @aa
    .............
    @aa就是procB 运行后得到的输出参数
      

  3.   

    思想就是用output参数。declare @param int outputexec sp_yoursp p1,p2,@param output--here you can use @param
      

  4.   

    对不起,我的意思是说,要使用执行procB后的记录集,而不是其返回值。
    我看楼上的定义为int类型的,而不是记录记吧。
    请各位再给个思路,最好有代码。
    搞了一天了,还没有搞定
    ;-(
      

  5.   

    A要实用B执行后返回的记录集,楼上有个:
    declare @myTable table(columnlist)
    set @myTable=exec(ProcB)
    可以啊。
    另外你也可以用游标来做:
    declare crusor_round cursor local for exec(B)
    open crusor_round......这个问题应该很简单,到Sql版可能找到很多答案
      

  6.   

    能不能给个例子,实在搞不定
    declare @myTable table(columnlist)
    set @myTable=exec(ProcB)
    这个怎么定义表??