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?