Vertica 数据库 金额转大写函数

首先的确是得吐槽一下这个Vertical数据库。列式存储,的确很适合用来搭建数据仓库平台,但是原生自带的语法不太适合写存储过程和函数,不集成其他的语言来支持写自定义函数的话,拓展性还是不够强。我是没有找到循环结构,导致函数体很臃肿,有没有看到这里的大佬在留言处提供一波思路。

参数类型 varchar 数值格式类似0.22 转换上限万亿(可自行拓展)

其中TEMP为我数据库上的一个模式名
案例:select TEMP.MONEY_CHINESE_2(‘222.03’)

函数一(转换数字大小写)

CREATE OR REPLACE FUNCTION TEMP.MONEY_CHINESE(P_NUM Varchar)
RETURN Varchar
AS
BEGIN
RETURN (
CASE WHEN 1=1 THEN
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(P_NUM,'9','玖')::varchar(100),'8','捌')::varchar(100),'7','柒')::varchar(100),'6','陆')::varchar(100),'5','伍')::varchar(100),'4','肆')::varchar(100),'3','叁')::varchar(100),'2','贰')::varchar(100),'1','壹')::varchar(100),'0','零')
ELSE ' ' END ::varchar(100)
);
END;

函数二(填单位)

CREATE OR REPLACE FUNCTION TEMP.MONEY_CHINESE_2(P_money Varchar)
RETURN Varchar
AS
BEGIN
RETURN (
CASE WHEN LENGTH(P_money)=4
    THEN (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'元' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'分' ELSE '' END)
   WHEN LENGTH(P_money)=5/*11.25*/
    THEN (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,5,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),5,1)||'分' ELSE '' END)
  WHEN LENGTH(P_money)=6/*111.25*/
   THEN (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),2,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,5,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),5,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,6,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),6,1)||'分' ELSE '' END)
   WHEN LENGTH(P_money)=7/*1111.25*/
   THEN  (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),2,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,6,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),6,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,7,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),7,1)||'分' ELSE '' END)
   WHEN LENGTH(P_money)=8/*11111.25*/
   THEN  (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'万' ELSE '' END)|| 
              (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),2,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,5,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),5,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,7,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),7,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,8,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),8,1)||'分' ELSE '' END)
  WHEN LENGTH(P_money)=9/*111111.25*/
   THEN  (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),2,1)||'万' ELSE '万' END)|| 
              (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,5,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),5,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,6,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),6,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,8,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),8,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,9,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),9,1)||'分' ELSE '' END) 
  WHEN LENGTH(P_money)=10/*1111111.25*/
   THEN  (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),2,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'万' ELSE '万' END)|| 
              (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,5,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),5,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,6,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),6,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,7,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),7,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,9,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),9,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,10,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),10,1)||'分' ELSE '' END)
  WHEN LENGTH(P_money)=11/*111111111.25*/
   THEN  (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),2,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'万' ELSE '万' END)|| 
              (CASE WHEN SUBSTR(P_money,5,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,6,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),5,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,7,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),6,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,8,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),7,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,10,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),9,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,11,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),10,1)||'分' ELSE '' END)
  WHEN LENGTH(P_money)=12/*111111111.25*/
   THEN  (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'亿' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),2,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,2,4)='0000' THEN ''
               WHEN SUBSTR(P_money,5,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),5,1)||'万' 
         ELSE '万' END)|| 
              (CASE WHEN SUBSTR(P_money,6,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),6,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,7,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),7,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,8,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),8,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,9,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),9,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,11,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),11,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,12,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),12,1)||'分' ELSE '' END)
  WHEN LENGTH(P_money)=13/*111111111.25*/
   THEN  (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),2,1)||'亿' ELSE '亿' END)||
     (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,5,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),5,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,3,4)='0000' THEN ''
               WHEN SUBSTR(P_money,6,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),6,1)||'万' 
         ELSE '万' END)|| 
              (CASE WHEN SUBSTR(P_money,7,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),7,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,8,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),8,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,9,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),9,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,10,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),10,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,12,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),12,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,13,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),13,1)||'分' ELSE '' END)
   WHEN LENGTH(P_money)=14/*111111111.25*/
   THEN  (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),2,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'亿' ELSE '亿' END)||
     (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,5,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),5,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,6,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),6,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,4,4)='0000' THEN ''
               WHEN SUBSTR(P_money,7,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),7,1)||'万' 
         ELSE '万' END)|| 
              (CASE WHEN SUBSTR(P_money,8,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),8,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,9,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),9,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,10,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),10,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,11,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),11,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,13,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),13,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,14,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),14,1)||'分' ELSE '' END)
   WHEN LENGTH(P_money)=15/*111111111.25*/
     THEN (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'仟' ELSE '' END)|| 
     (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),2,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'亿' ELSE '亿' END)||
     (CASE WHEN SUBSTR(P_money,5,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),5,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,6,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),6,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,7,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),7,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,5,4)='0000' THEN ''
               WHEN SUBSTR(P_money,8,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),8,1)||'万' 
         ELSE '万' END)|| 
              (CASE WHEN SUBSTR(P_money,9,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),9,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,10,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),10,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,11,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),11,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,12,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),12,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,14,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),14,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,15,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),15,1)||'分' ELSE '' END)
    WHEN LENGTH(P_money)=16/*111111111.25*/
     THEN (CASE WHEN SUBSTR(P_money,1,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),1,1)||'万' ELSE '' END)||  
              (CASE WHEN SUBSTR(P_money,2,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),2,1)||'仟' ELSE '' END)|| 
     (CASE WHEN SUBSTR(P_money,3,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),3,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,4,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),4,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,5,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),5,1)||'亿' ELSE '亿' END)||
     (CASE WHEN SUBSTR(P_money,6,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),6,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,7,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),7,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,8,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),8,1)||'拾' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,6,4)='0000' THEN ''
               WHEN SUBSTR(P_money,9,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),9,1)||'万' 
         ELSE '万' END)|| 
     (CASE WHEN SUBSTR(P_money,10,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),10,1)||'仟' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,11,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),11,1)||'佰' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,12,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),12,1)||'拾' ELSE '' END)||
              (CASE WHEN SUBSTR(P_money,13,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),13,1)||'元' ELSE '元' END)||
     (CASE WHEN SUBSTR(P_money,15,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),15,1)||'角' ELSE '' END)||
     (CASE WHEN SUBSTR(P_money,16,1)<>'0' THEN SUBSTR(TEMP.MONEY_CHINESE(P_money),16,1)||'分' ELSE '' END)
ELSE ' ' END
);
END;

你可能感兴趣的:(数据库,VERTICA,数据库,金额转大写)