Thursday, December 11, 2008

OBIEE LOV prompts

The classical way of making a LOV prompt is creating SQL in the form:

SELECT case 1=0 then TABLE.COLUMN else "YES" end from BM_NAME union all SELECT case 1=0 then TABLE.COLUMN else "NO" end from BM_NAME

This always produces costly SQL since OBIEE will execute this as a SELECT DISTINT against the reference table.

Much better is to add a small LOV table to repository with it's own business model. I created a small XLS spreadsheet with a couple of LOV's:

image

Next I imported it into the repository and create the dim version of the LOV:

image

Made a very simple business model for it:

image

And of course a presentation layer:

image

Now you can create each LOV prompt as a direct SQL request:

image

SELECT LOV.LOV_VALUE FROM BM_LOV WHERE LOV.LOV_TYPE = 'BOOLEAN' ORDER BY LOV.LOV_SORT

The result can be stored in a presentation or a repository variable for late processing:

image

Till Next Time

1 comment:

Big Mac said...

John,

Thanks for this article. I am trying to use this solution. I can not get it to work with some other fact table in my RPD. If I filter the a report based on the generated Presentation Variable I get an error related to other Dims in the Presentation folder. I was compining this with the obiee-switching-between-filters section.