用什么工具将SQLserver的存储过程转换成Oracle的存储过程,请教
1个回答
展开全部
1
2
3
4
5
6
7
8
9
10
11
12
13
CREATE OR REPLACE PROCEDURE GETMATERIALCC(sumyear varchar2,
wellname varchar2,
OUT_CUR OUT SYS_REFCURSOR) AS
STRSQL VARCHAR2(4000);
BEGIN
STRSQL := 'select ''' || sumyear || ''' as 年月,c.countname as 分摊方式,d.departmentname as 库存地点,
ROUND(SUM(a.sysl*a.dj),1) as 库存费用,ROUND(SUM(a.je),1) as 总费用 from Material_Cyz a
left join costcounttype c on a.counttype=c.counttype
left join Department d on a.kcdd=d.departmentid
where SUBSTR(a.ny,1,4)=''' || sumyear ||
''' group by kcdd,c.countname,d.departmentname';
OPEN OUT_CUR FOR STRSQL;
END GETMATERIALCC;
2
3
4
5
6
7
8
9
10
11
12
13
CREATE OR REPLACE PROCEDURE GETMATERIALCC(sumyear varchar2,
wellname varchar2,
OUT_CUR OUT SYS_REFCURSOR) AS
STRSQL VARCHAR2(4000);
BEGIN
STRSQL := 'select ''' || sumyear || ''' as 年月,c.countname as 分摊方式,d.departmentname as 库存地点,
ROUND(SUM(a.sysl*a.dj),1) as 库存费用,ROUND(SUM(a.je),1) as 总费用 from Material_Cyz a
left join costcounttype c on a.counttype=c.counttype
left join Department d on a.kcdd=d.departmentid
where SUBSTR(a.ny,1,4)=''' || sumyear ||
''' group by kcdd,c.countname,d.departmentname';
OPEN OUT_CUR FOR STRSQL;
END GETMATERIALCC;
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
今至电子科技有限公司
2024-08-23 广告
2024-08-23 广告
数据库备份是确保数据安全与业务连续性的关键环节。我们上海今至电子科技有限公司高度重视数据保护,定期执行全面的数据库备份策略。这包括使用先进工具和技术,对关键业务数据进行自动化备份,并存储在安全可靠的外部存储介质或云端。通过定期验证备份的完整...
点击进入详情页
本回答由今至电子科技有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询