AnsweredAssumed Answered

How to add a literal around ExecuteSQL query fields?

Question asked by fmpdude on Apr 16, 2018
Latest reply on Apr 16, 2018 by fmpdude

I'm sure this is probably simple, but I'm having trouble just adding a literal, like a "(" and a ")"  -- to put around numbers in ExecuteSQL output.

 

In MySQL, this is simple, with the built-in concat function, like this:

 

select concat('$(', `Yearly Amounts`, ')') as expense from Expenses

 

prints numbers, as expected, like ($10.00).

 

---

 

Yet, in FMP, I can't quite see how to do the same thing.

 

ExecuteSQL ( "select" &  '(' & " invoice_amount from expenses " & ')' & " as test" , "" ,"")

 

==> Blank Result.

 

The FMP SQL Reference manual only references concatenation, that I found, discussing combining two fields, but not literals like "(" or other.

 

Thanks in advance for suggestions.

Outcomes