Quote: 引用:Quote: 引用:if to_date(substr(BeginDate,7,2),'mm')<'05'这句 目地是想判断统计日期是否小于5号,BeginDate是统计日期参数,报错了,说格式不对两边类型都不一样,还有就是substr里面应该为字符型,修改如下:if to_char(begindate,'dd')<'05' if to_date(substr(BeginDate,7,2),'dd')<to_date('05','dd') then我最后是这么解决的
Quote: 引用:if to_date(substr(BeginDate,7,2),'mm')<'05'这句 目地是想判断统计日期是否小于5号,BeginDate是统计日期参数,报错了,说格式不对两边类型都不一样,还有就是substr里面应该为字符型,修改如下:if to_char(begindate,'dd')<'05'
if to_date(substr(BeginDate,7,2),'mm')<'05'这句 目地是想判断统计日期是否小于5号,BeginDate是统计日期参数,报错了,说格式不对