一列(txn_issue_dt)是char,issue_dt是日期,我试图比较两者,但我是自学的,我很难过,请帮忙。
SELECT ptf.carrid,
ptf.cov_effdt,
ptf.cvg_id,
ptf.err_msg,
ptf.error_id,
ptf.fine_dt,
ptf.fine_id,
ptf.fine_status,
ptf.polnbr,
ptf.txn_code,
ptf.txn_type,
ptf.rcvd_dt
FROM policy_tracking_fine_view ptf
INNER JOIN canc_rein cr ON cr.polnbr = ptf.polnbr
WHERE ptf.txn_code = '05'
AND ptf.fine_type = 'L'
AND ptf.fine_status_descrip NOT IN ('SUSPENDED', 'VOID')
AND TO_CHAR (ptf.txn_issue_dt, 'yy-mon-dd') = TO_DATE (cr.issue_dt, 'mm/dd/yy');
我得到 ORA-01481:invalid number format model 和 ORA-01861: literal does not match format string