AnsweredAssumed Answered

ExecuteSQL(), constant in select list results null if there is no record in aggregate group

Question asked by user19752 on Mar 16, 2016
Latest reply on Mar 18, 2016 by beverly

ExecuteSQL ( "

SELECT COUNT(*), 1

FROM table

WHERE 1=0

";"";"" )

 

results

0,

 

but I expect

0,1

 

I'm not sure how the standard SQL works, but MS document says in example

"The expression 1+2 evaluates to 3 in each row in the result set"

Expressions (Transact-SQL)

and PostgreSQL also works so.

 

FM looks like evaluating on (each?) records on table then get result from table, not evaluating "in the result set".

Outcomes