with a as( select distinct htno,pono,LDCC_BEGIN_TIME FROM "BGTAMODLL3"."T_ODS_TMMSM21" a where LDCC_BEGIN_TIME is not null order by pono )
如题 where LDCC_BEGIN_TIME is not null 没生效,字段LDCC_BEGIN_TIME 仍然有空值
where LDCC_BEGIN_TIME is not null and LDCC_BEGIN_TIME <>''
试试
改成
where (LDCC_BEGIN_TIME is not null or LDCC_BEGIN_TIME <> '')
where length(LDCC_BEGIN_TIME )>0