Hello, all,
I've got a query that (pseudocode) is like:
SELECT fname, lname, ORGS.EntityName dir, Table2b.EntityName div, Table3.personalid, COALESCE(Table2b.EntityName, ORGS.EntityName, 'N/A') org FROM personnel, (ORGS INNER JOIN ORGS Table2b ON ORGS.OrgID = Table2b.ParentID), Table3
I'm getting an error message: "Table2b"."EntityName" : invalid identifier. I've also tried using the alias (dir,div), same error message.
ORGS table has organizations; some organizations are "parent" organizations of other organizations, and has an ORGID and PARENTID.
How can I use COALESCE() (if one is blank/null, get the other; if that's blank/null, use 'N/A') in this query?
V/r,
^_^