How can I join on a stored procedure?

后端 未结 9 2048
渐次进展
渐次进展 2020-12-25 10:48

I have a stored procedure that takes no parameters, and it returns two fields. The stored procedure sums up all transactions that are applied to a tenant, and it returns the

9条回答
  •  感情败类
    2020-12-25 11:47

    I actually like the previous answer (don't use the SP), but if you're tied to the SP itself for some reason, you could use it to populate a temp table, and then join on the temp table. Note that you're going to cost yourself some additional overhead there, but it's the only way I can think of to use the actual stored proc.

    Again, you may be better off in-lining the query from the SP into the original query.

提交回复
热议问题