Create a Parameter with the SQL Expression Data Type

For a parameter that uses the SQL expression data type, you must enter or paste a Logical SQL expression to supply the column value that you want the parameter to use.

If the Developer option isn't displayed from the workbook, then you must enable the developer options from your profile settings. See Developer Options.
For information about referencing parameters in SQL expressions, see Syntax for Referencing Parameters.
  1. On the Home page, select the workbook to add a parameter to, click Actions, and then select Open.
  2. To find and copy the Logical SQL expression for the column that you want to specify as a parameter value, in the workbook drag and drop the column to a canvas.
  3. Click Menu on the workbook toolbar and select Developer.
    Actions button and Developer menu option

  4. In the Developer pane, click Performance Tools and then click Logical SQL. Click Refresh.
    Developer dialog Refresh button

  5. Locate and copy the Logical SQL SELECT statement for the column that you want to use as a value in the parameter.
  6. In the Workbook editor, go to the Data Panel click Parameters.
  7. In the Parameters Pane, click Add.
  8. In the Name field, enter a name.
  9. Click Data Type and select SQL Expression.
  10. In the Available Values field select Logical SQL Query.
    Logical SQL Query possible value option

  11. In the text box, paste the column's Logical SQL expression. For example,
    SELECT
       0 s_0
       XSA('Admin'.'sample_order_line')."sample_order_line"."City" s_1
    FROM XSA('Admin'.'sample_order_line')
    ORDER BY 2 ASC NULLS LAST
    FETCH FIRST 125001 ROWS ONLY
  12. Optional: Alternatively, provide an expression that includes a parameter with a default value. For example,
    SELECT @parameter("Current Date")(DATE'2023-05-02') FROM XSA('Admin'.'sample_order_line')
  13. Click Validate to validate the Logical SQL expression that you pasted.
  14. Click OK.
  15. Click Save.