Working with SQL prompts

You use SQL prompts to limit the data retrieved from a visual query or a dynamart.

About this task

SQL prompts are part of SQL statements that you add when you write a condition to select only the data that is filtered by a specified value. When you run a query, you must specify the value for this prompt before you get the result set.

To add an SQL prompt to a visual query:

Procedure

  1. Open the SQL tab.
    Note: You can specify a prompt in the Conditions column on the Build tab of the Visual Query Editor.
  2. Write a condition with a variable that is marked by an ampersand (&) character.
  3. Type the name of the prompt after the ampersand.

Example

For example:
SELECT DISTINCT A.AREA, A.STATE_NAME
FROM DEMO.STATEDETAILS A
WHERE (A.AREA >&S)