to_char(state_date,'yyyymmdd')<
(select max(to_char(state_date,'yyyymmdd')) from serv_product where product_id=301032
and state not in ('H0A','H1X') );日期可以直接比较,转换成字符型反倒容易出错
改一下:
state_date )<
(select max(state_date) from serv_product
where product_id=301032 and state not in ('H0A','H1X') );
(select max(to_char(state_date,'yyyymmdd')) from serv_product where product_id=301032
and state not in ('H0A','H1X') );日期可以直接比较,转换成字符型反倒容易出错
改一下:
state_date )<
(select max(state_date) from serv_product
where product_id=301032 and state not in ('H0A','H1X') );
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货