Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

User Input Field to be used in Where Clause of SQL script?

I have read many discussions on User Input prompts.

I am looking to load data from a SQL script

and I need the where clause to load from the value of what the user typed in the User Input Prompt.

Here's what I have so far; but I get an error message:

LET vMyVar = INPUT('Enter Incident #', 'Input box');

SQL SELECT *

FROM ( SELECT "INCIDENT_NUMBER"

FROM AUDITED_FIELDS

WHERE "INCIDENT_NUMBER" = mMyVar);

any help?

I am getting the following error:

ErrorSource:  Microsoft OLE DB Provider for ODBC Drivers, ErrorMsg:  [Oracle][ODBC][Ora]ORA-00904: "VMYVAR":  invalid identifier

1 Solution

Accepted Solutions
Not applicable
Author

I figured it out.

Needed to state Where "INCIDENT_NUMBER" = $(mMyVar);

and it worked!!

View solution in original post

1 Reply
Not applicable
Author

I figured it out.

Needed to state Where "INCIDENT_NUMBER" = $(mMyVar);

and it worked!!