db2 创建function报错

 create function fun_fw_sfyczy(pi_operunitid varchar(2)) 
returns varchar(2)
LANGUAGE SQL 
BEGIN ATOMIC
     DECLARE v_count int;
     set v_count =(select count(1) from fw_operator where operunitid = int(pi_operunitid) and aae100 = '1');
     if v_count = 0 then
        return '0';
     end if;
     return '1';   
END
以上是我创建的函数,求助,哪错了?看了好几遍找不出错误,下面是错误信息
 
 

猜你喜欢

转载自www.cnblogs.com/Miragic/p/10837300.html