KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Avoid named parameters in SQL statements
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: August 8, 2022

Named parameters used within the #DECLARE command should not be treated as variables. Instead, named parameters are simply assigning aliases to parameters, hence the name. Since SQL statements already cannot use parameters, named parameters will also result in a runtime error.



To resolve the issue, simply copy the value of the parameter to a local variable, then use the local variable in the SQL statement.