I’ve got a couple of questions regarding NVL usage in Oracle, but I’ll start with the most vexing first
I have a situation where I’m pulling the business name of a customer from a table. However, if that customer isn’t currently active - instead they are pending - the business name resides on a different table until the order is complete.
Here’s the select that I’m trying to use:
NVL(N.BUSINESS_NAME,D.BUSINESS_NAME) AS “BUSINESS NAME”,
Which refers back to this join:
LEFT OUTER JOIN IDST_CUST_BUS_DIRECTORY N
ON W.ACCTCORP=N.ACCTCORP AND W.HOUSE=N.HOUSE AND W.CUST=N.CUST
LEFT OUTER JOIN IDST_WIP_BUS_DIRECTORY D
ON W.ACCTCORP=D.ACCTCORP AND W.HOUSE=D.HOUSE AND W.CUST=D.CUST AND W.WPCNT=D.WPCNT
However, the NVL doesn’t appear to be working - if the value is null (as it shows on the data grid in TDA), it is not pulling the value from the other table, which isn’t null.