请帮忙分析分析这个简单的存储过程。

southdoor 2004-02-05 02:04:22
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO

ALTER proc pz

as
exec('insert (select b.code from 公司代码 b where b.inc=a.inc and b.inc0=a.inc0) as 客户编号,sum(a.f_qj+a.f_hl+a.f_qj1+a.f_qp) as 金额借方 ,"106" as 科目编号 into 凭证数据 from hl a group by a.inc,a.inc0')

exec('insert (select b.code from 公司代码 b where b.inc=a.inc and b.inc0=a.inc0) as 客户编号,sum(a.f_qj+a.f_qj1) as 金额贷方 ,"40603" as 科目编号 into 凭证数据 from hl a group by a.inc,a.inc0')

exec('insert (select b.code from 公司代码 b where b.inc=a.inc and b.inc0=a.inc0) as 客户编号,sum(a.f_hl) as 金额贷方 ,"40604" as 科目编号 into 凭证数据 from hl a group by a.inc,a.inc0')

exec('insert (select b.code from 公司代码 b where b.inc=a.inc and b.inc0=a.inc0) as 客户编号,sum(a.f_qp) as 金额贷方 ,"40608" as 科目编号 into 凭证数据 from hl a group by a.inc,a.inc0')


GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

错误提示:
服务器: 消息 8146,级别 16,状态 1,过程 pz,行 0
过程 pz 没有参数,但却为该过程提供了参数。
...全文
22 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复

22,209

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧