With this SQL, (in both select statements, the datatype is number(15,0))
SELECT NVL(TRIM(K3A.BSA_ID), 0) as FINANCIAL_INST_BRANCH_SEQ_NUM
FROM CASH_8300_3A K3A
SELECT 0 AS FINANCIAL_INST_BRANCH_SEQ_NUMB
I get the following error:
ORA-01790: expression must have same datatype as corresponding expression
01790. 00000 - "expression must have same datatype as corresponding expression"
Error at Line: 1 Column: 7
Why does TRIM fail the MERGE? If it's job is to just remove leading zeros, I am not understanding the fail here.