两个SQL语句,分别为函数nvl,round,substr和to_date
insert into TB_ZY_QTYZMX__ (YLJGDM,YZID,JZLSH,YZZID,CXBZ,YZKSSJ,YZJDHSBH,YZJDHSXM,YZJDSJ,TZYSBH,TZYSXM,YSTZSJ,QRTZHSBH,QRTZHSXM,ZXKSBM,ZXKSMC,ZXRBH,ZXRXM,YZZXSJ,YZZZSJ,YZSM,YZXH,YZZH,YZMXBM,YZMXMC,YZXMFLDM,YZXMFLMC,ZLXMLBBM,ZXPL,CJFX,CJBB,JCBW,MZFS,BZ,MJ,XGBZ,GRBSLX,GRBSH) select replace(YLJGDM,'-','') as YLJGDM,YZID,JZLSH,YZZID,CXBZ,to_date(YZKSSJ,'yyyy-MM-dd hh24:mi:ss'),nvl(YZJDHSBH,'-'),nvl(YZJDHSXM,'-'),to_date(YZJDSJ,'yyyy-MM-dd hh24:mi:ss'),TZYSBH,TZYSXM,to_date(YSTZSJ,'yyyy-MM-dd hh24:mi:ss'),nvl(QRTZHSBH,'-'),nvl(QRTZHSXM,'-'),ZXKSBM,ZXKSMC,nvl(ZXRBH,'-'),nvl(ZXRXM,'-'),to_date(YZZXSJ,'yyyy-MM-dd hh24:mi:ss'),to_date(YZZZSJ,'yyyy-MM-dd hh24:mi:ss'),nvl(YZSM,'-'),YZXH,YZZH,nvl(YZMXBM,'-'),nvl(YZMXMC,'-'),YZXMFLDM,YZXMFLMC,ZLXMLBBM,ZXPL,CJFX,CJBB,JCBW,MZFS,nvl(BZ,'-'),MJ,XGBZ,GRBSLX,GRBSH from TB_ZY_QTYZMX ; ------------------------------------------------------------------------------------------------ insert into TB_MZ_YPCFMXB__ (YLJGDM,CFMXID,JZLSH,GRBSLX,GRBSH,CFZID,CFYZXH,CFYZZH,ZLXMLBBM,XMBM,XMMC,XMFLBM,XMFLMC,JXDM,YPGG,YYTJDM,SYPCDM,YYPC,SYCJL,SYJLDW,SYZJL,ZYYYFF,FYSL,FYSLDW,YYTS,YWLX,CFKSSJ,CFTZSJ,ZXKSBM,ZXKSMC,ZXRBH,ZXRXM,CFZXSJ,BZ,MJ,XGBZ) select replace(YLJGDM,'-','') as YLJGDM,CFMXID,JZLSH,GRBSLX,GRBSH,CFZID,CFYZXH,CFYZZH,ZLXMLBBM,nvl(XMBM,'-'),nvl(XMMC,'-'),XMFLBM,XMFLMC,JXDM,YPGG,YYTJDM,SYPCDM,YYPC,round(SYCJL,3),SYJLDW,round(SYZJL,3),ZYYYFF,substr(round(FYSL,2),0,5),FYSLDW,round(YYTS,2),YWLX,CFKSSJ,CFTZSJ,ZXKSBM,ZXKSMC,nvl(ZXRBH,'-'),nvl(ZXRXM,'-'),CFZXSJ,nvl(BZ,'-'),MJ,XGBZ from TB_MZ_YPCFMXB ;
------------正 文 已 结 束, 感 谢 您 的 阅 读 (折雨的天空)--------------------
转载请注明本文标题和链接:《oracle中空值替换,精度空值(保留小数位数),时间转换》
发表评论