Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Using COALESCE() in a query is breaking

$
0
0

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,

 

^_^


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>