"The input value is not long enough in the date format" reported in Oracle for date conversion"
[sql] select (select j.jgmc from t_zzjg j where j.jgdm = t.jgdm) jgmc, t.jgdm, sum(t.jcj) jcj, sum(t.sa) sa, sum(t.la) la, sum(t.ajbl) ajbl, sum(t.xsqzcs) xsqzcs, sum(t.sacw) sacw, sum(t.jgzx) jgzx, sum(t.zfgz) zfgz, sum(t.jjclaj) jjclaj, sum(t.zs) zs from t_fxyp_zfycfbtj t where t.rq between to_date(2013 - 01 - 18 , 'YYYY-MM-DD') and to_date(2013 - 07 - 18 , 'YYYY-MM-DD') and exists (select z.jgdm from t_zzjg z where (z.dwlx = 'SJ' or z.sjjgdm is null) and z.jgdm = t.jgdm) group by t.jgdm order by t.jgdm
Correct statement
select to_date('2012-05-06 12:05:03','yyyy-mm-dd hh24:mi:ss') from dualselect to_date('2012-05-06','yyyy-mm-dd hh24:mi:ss') from dualselect to_date('2012-05-06','yyyy-mm-dd') from dual
This query statement causes this reason because in the to_date () method, the date entered earlier must be enclosed in single quotation marks.