SQL compilation error: Expression type does not match column data type, expecting DATE but got NUMBER(9,0) for column Invoice_Date
I tried TO_DATE(Invoice_Date)
and DATE(Invoice_Date)
, but still get the same error... Please let me know if there is something else I can try.
Here's the format of the SQL:
INSERT INTO UBS_STAGE.STAGE_BILLING
(
INVOICE_DATE
)
SELECT INVOICE_DATE
FROM BSCHEMA.BTABLE;
The column type in BTABLE is DATE and sample data is as follows:
2019-05-7
2019-05-22