Use FORMULA() outside SQL, i.e. in method call syntax, to:
You can use any SQL syntax supported by your database vendor. To keep your USoft application portable between databases, however, you should adhere to standards. This is particularly a concern when calling SQL functions. USoft converts certain key SQL functions automatically between databases. Others are database-specific. Please consult the Definer Help for details.
FORMULA is itself an embedded method call that returns a string value to the embedding method call. For more information, see the FORMULA()help topic
FORMULA(<formula>, <value>, [, <value>...])
SQL expression, with placeholders representing the values identified by the other parameters: :1 represents value 1, :2 represents value 2, and so on.
Values used in the SQL expression. These can be hard-coded strings, or values represented by embedded method calls.
FORMULA(':1 || :2',query.file_name(),'.TXT')
FORMULA(':1 || SUBSTR(INSTR(:2,:3)',
'Domain = ', query.email(), '@')