cancel
Showing results for 
Search instead for 
Did you mean: 

How to write @prompt in database

Former Member
0 Kudos

Hi

I need pass prompt values in a query in order to check the performance of the query which BO is generated .

The below is the BO generated like this

For example Table_name.col_nam IN @PROMPT(select etc

How can i write in sql what @prompt is doing there.

Thanks in advance.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

thanks

0 Kudos

This depends on the data type of your col_nam and the SQL syntax your data source is accepting.

The following syntax will probably work:

Assumption: Table_name.col_nam is defined to store numerical values

Mutliple values

Table_name.col_nam IN (1, 2)

Single value

Table_name.col_nam IN (1)

Assumption: Table_name.col_nam is defined to store alphanumerical values

Mutliple values

Table_name.col_nam IN ('Name1', 'Name2')

Single value

Table_name.col_nam IN ('Name1')

Regards,

Stratos

Edited by: Efstratios Karaivazoglou on Jan 8, 2011 11:18 AM

Former Member
0 Kudos

I agree what ur saying but i need to pass ALL values means thousands of values

pls correct me so no need to pass that 1000 of values or only i can select 5 or 10----values out of 1000

so I t will evaluates the performance if i select only few values in the list

Pls correct me

Edited by: send2madhuk on Jan 8, 2011 11:35 AM

Former Member
0 Kudos

It is very difficult right to pass values table_nam.col_nam IN (value1,value2,values3----


value1000)

Ples sugget me how cani write the code

or

passing of 2 or 3 values are enough..

Thanks.

0 Kudos

This depends on how your end users are going to use the report. I would recommend to go back and ask them to provide you with some common usage examples. These should be some parameter values that the end users are expected to use often.

You can then try those values out with your SQL query. It is very probable that your end users would like to select just a couple of values from the prompt picklist.

Regards,

Stratos

arijit_das
Active Contributor
0 Kudos

Replace @Prompt in the sql with the values entered in the prompt selection for webi like below:

select col1,col2 from table where table.col3 in (value1,value2,....)