I have a table named INVOICE_ET which has column of below definition
INVDATE CHARACTER 10
result of select INVDATE from INVOICE_ET is as below
INVDATE
2021-07-31
In another table INVOICE_DY, I have a column named INV_DAYS, which has below definition
INV_DAYS DECIMAL 3
result of select INV_DAYS from INVOICE_DY is as below
INV_DAYS
88
Now my question is, I am trying to add INVOICE_DY.INV_DAYS field with INVOICE_ET.INVDATE field, but the char casting is not working, Please suggest how can I add these two columns. I am trying to get something like below
Select a.INVDATE, b.INV_DAYS, (a.INVDATE + b.INV_DAYS) as DUE_DATE
from INVOICE_ET a
join INVOICE_DY b
On a.INVNUM = b.INVNUM //(edited this portion, because join is based on Invoice numbers)
Result should be
INVDATE INV_DAYS DUE_DATE
2021-07-31 88 2021-10-27
Any suggestions/ thoughts are welcome.