AnsweredAssumed Answered

ExecuteSQL: constant with DECLARE and SET

Question asked by NorbertWeiss_1 on Sep 19, 2018
Latest reply on Sep 20, 2018 by user19752

An arguments list with "?"s in the SQL statement in ExecuteSQL doesn't fit to what I need (I need more flexibility), so I'm looking for a way to define a constant in my SQL query that's used in ExecuteSQL. What I've found, DECLARE and SET are the correct Keywords to use for this in SQL. These keywords are also mentioned in FM SQL Reference. So they seem to be the correct commands for this.


However, it doesn't work: Whenever I use DELARE and/or SET SQL result is "?".


a) can DECLARE and SET be used in ExecuteSQL?

b) if yes, what is the correct syntax?