您的位置:首页 > 产品设计 > UI/UE

Row wise initialized variable in OBIEE 11g and VALUELISTOF function

2012-01-15 22:14 786 查看
 
OBIEE up to 10g had a limitation around session variables which are row wise initialized ,in that you cannot use that variable to initialize another subsequent session variable.  Good news!! 11g seems to have a fix for this.

For e.g. lets say you have a session (row wise initialized)  variable called “REGION” initialized as follows

select ‘REGION_LIST’ ,region_id from region_table.

Now lets say you want to initialize another row wise initialized variable based on the ‘REGION_LIST’ variable you had initialized earlier. For e.g. all the accounts belonging to the ‘REGION_LIST’ variable.

Here is the new way of doing it in  11g

select ‘ACCOUNT_LIST’ ,account_id from accounts where

region_id in (VALUELISTOF(NQ_SESSION.REGION_LIST)).

Keep in mind this will go back to the database as an in list, coma separated and the values would be in single quotes.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐