Friday, March 28, 2008

OBIEE Yes No Prompt

Sometimes you need a simple Yes / No prompt. If you don't have a LOV (List of Values) table in your db defined there is a simple workaround.

Create a new prompt based on any column:


Next set show to SQL results, deselect all choices:


Alter the SQL to:

SELECT case when 1=0 then TBLTRUCKS.LICENSEPLATE else 'Yes' end FROM Trucks union all SELECT case when 1=0 then TBLTRUCKS.LICENSEPLATE else 'No' end FROM Trucks


The "case when 1=0 then TBLTRUCKS.LICENSEPLATE " is only there to trick OBIEE in thinking that it's selecting a column.



Alter the column name to 'SELECTOR' (single quotes).



Set your default value, your presentation variable and set the label:

Till Next Time





1 comment:

Herman said...

This solutions works fine against an oracle database.
When using a MySql database The MySql ODBC 5.1 Driver returns an SQL syntax error