Data error date format mistakes, he would want to know the order of execution, date wrong judgment also eliminated
SELECT
ACCTNO, account/* */
ACCNAME,/* username */
OPENDATE,/* opening date */
CLOSEDATE/* pin households date */
The FROM DM_CBS_DPSOPENCLOSEACCREG
WHERE OPENDATE & lt;=CLOSEDATE
ISDATE (OPENDATE)=1/* data format correct */
AND ISDATE (CLOSEDATE)=1)
AND DAYS (TO_DATE (CLOSEDATE, 'YYYYMMDD')) - DAYS (TO_DATE (OPENDATE, 'YYYYMMDD')) & lt; 10
Data error date format mistakes, he would want to know the order of execution, date wrong judgment also eliminated