将db2的函数转为mysql的函数CREATE OR REPLACE FUNCTION "DB2ADMIN"."GETASNOSBYPNOANDCNO"
(pno varchar(10),cno varchar(1))
RETURNS table(as_nos varchar(2))
LANGUAGE SQL
SPECIFIC SQL150907174255300
RETURN
select as_nos from(
select substr(as_nos,'1','1') as as_nos from mcm_xwprd_info where p_no=pno and ft_object=cno
union
select substr(as_nos,'3','1') as as_nos from mcm_xwprd_info where p_no=pno and ft_object=cno
union
select substr(as_nos,'5','1') as as_nos from mcm_xwprd_info where p_no=pno and ft_object=cno
union
select substr(as_nos,'7','1') as as_nos from mcm_xwprd_info where p_no=pno and ft_object=cno
) where as_nos !=''
添加回答
举报
0/150
提交
取消