Parameter Prompt Mystery

LO 25.8.4.2 on Windows, HSQLDB external v2.7.4

The following query works as expected:

SELECT "Sequence", ROW_NUMBER ( ) OVER ( ) AS "Row_Number" FROM ( SELECT DISTINCT "Sequence" FROM "Clients" WHERE "Route" = 'B' ) 

The following query gives the error
image

SELECT "Sequence", ROW_NUMBER ( ) OVER ( ) AS "Row_Number" FROM ( SELECT DISTINCT "Sequence" FROM "Clients" WHERE "Route" = :Enter_Route ) 

Can anyone see what the problem is? (Variations in the placement of the blanks between the equal sign, the colon and Enter_Route seem to have no effect.)

Thanks,
Charles

Check if SQL Direct button is not pressed (ON) in queries GUI.
Parameters need the Base parser.
Parameters dialog shows up?

1 Like

Ah @CRDF! Indeed, the problem is the SQL Direct button. Thanks.

Is there an explanation somewhere of exactly what that button does? I don’t see an explanation in the doc other than it means that “the query runs the SQL commands directly” which is kind of a circular definition.

Usually Base parses your query first and may even modify it (parameter substtution).
The button switches this off and gives your string ‘directly’ to the database.