变量和存储过程
作为我的上一个问题的后续问题,我想知道是否有是执行以下操作的简单方法(无法编译):
CREATE TABLE #PV ([ID] INT, [Date] DATETIME, Dis FLOAT, Del Float, Sold Float)
INSERT #PV @ID, exec GetPVSummaryReport @ID, @PID, @From, @To
原因是我需要通过 [ID] 将 #PV 连接到另一个表,但原始存储过程没有必要的参数。
更新 SP 很困难(并非不可能),因为代码是“野外”的,而且我不希望有“GetPVSummaryReport2”(我们已经有几个了)。
As a follow-up to my previous question I would like to know if there is a simple way of doing the following (which doesn't compile):
CREATE TABLE #PV ([ID] INT, [Date] DATETIME, Dis FLOAT, Del Float, Sold Float)
INSERT #PV @ID, exec GetPVSummaryReport @ID, @PID, @From, @To
The reason is I need to join #PV onto another table by [ID], but the original stored procedure doesn't have the necessary parameter.
Updating the SP is difficult (not impossible) as the code is 'out-in-the-wild' and I'd prefer not to have 'GetPVSummaryReport2' (which we already have several of already).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
或者
Or