I want to implement something similar to IIF in the QoQ below. However it's giving me an error. Either I'm doing it wrong or it's just not possible. Hopefully, it's the former.
<cfquery dbtype="query">
select
lastname + IIF(Len(firstname) > 0, DE(", " & firstname), DE("")) as fullname
from myquery
</cfquery>
I'm getting this error:
Query Of Queries syntax error.
Encountered "(. Incorrect Select Statement, Expecting a 'FROM', but encountered '(' instead, A select statement should have a 'FROM' construct.
Any ideas on how to fix this problem?