用什么工具将SQLserver的存储过程转换成Oracle的存储过程,请教
答案:2 悬赏:30 手机版
解决时间 2021-02-07 01:45
- 提问者网友:难遇难求
- 2021-02-06 06:26
用什么工具将SQLserver的存储过程转换成Oracle的存储过程,请教
最佳答案
- 五星知识达人网友:底特律间谍
- 2021-02-06 06:46
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;
全部回答
- 1楼网友:时间的尘埃
- 2021-02-06 07:17
知道的话跟我说下
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯