Using Presentation variables..along with case statements..

Hi All.
I have a issue using presentation variable along with CASE statements. My approach is
1) I have a dashboard prompt, which is being set as Presentation variable.
Based on the value selected in prompt, for ex the values of prompt can be 'ABC' and 'DEF'.
I have a calculated column, the calculation goes this way...
The forumal is
CASE WHEN @{Presentation Variable Name} = 'ABC' THEN xxxxxxxxxx ELSE IF @{Presentation Variable Name} = 'DEF' END. It gives error of "no table being referenced"..
Is this is the right approach??
Can i get the values of variable in a column formula, so that a column can have values selected in prompt?
Can anybody pls help me here..
Thanks in advance...

Hi
Thanks for the quick response..
I agree to ur point..
But the requirement is
Based on the value of the prompt I need to switch the calculation in one of the formula area of one column..
If Prompt value is ABC then one kind of calculation in Fx and If the prompt value is DEF then one kind of calculation in the same Fx..
How can I acheive this?
Thanks in advance..

Similar Messages

  • SQL Expression Field - Combine Declared Variable With Case Statement

    Hello All, I have been using Crystal & Business Objects for a few months now and have figured out quite a bit on my own. This is the first real time I have struggled with something and while I could do this as a Formula Field I would like to know how to do this as a SQL Expression. Basically I want to create a SQL Expression that uses a CASE statement but I wanted to make the code a little more efficient and employ a variable to hold a string and then use the variable in the CASE statement. The expression editor accepts the CASE statement OK but I don't know how to declare the variable. Please assist with the syntax?
    This is what I have:
    CASE
       WHEN u201CDatabaseu201D.u201DFieldu201D = u2018Hu2019 THEN u2018Hedgeu2019
       WHEN u201CDatabaseu201D.u201DFieldu201D = u2018Pu2019 THEN u2018PVIu2019
       ELSE u2018Noneu2019
    END
    This is what I want:
    DECLARE strVar AS VARCHAR(25)
    strVar =  u201CDatabaseu201D.u201DFieldu201D
    CASE
       WHEN strVar = u2018Hu2019 THEN u2018Hedgeu2019
       WHEN strVar = u2018Pu2019 THEN u2018PVIu2019
       ELSE u2018Noneu2019
    END

    Hi Todd,
    Please use the following for loop; your problem will be solved.
    Local StringVar str := "";
    Local NumberVar strLen := Length ({Database.Field});
    Local NumberVar i;
    For i := 1 To strLen Do
           if {Database.Field} <i> = "H" then str := "Hedge"
            else if {Database.Field} <i> = "P" then str := "PVI"
            else str := "None"; exit for
    str
    Let me know once done!
    Thank you,
    Ashok

  • Sorting columns dynamically using Presentation Variables

    Hi,
    I have 4 measures say A,B,C,D , a period dimension and branch name dimension. I would like to select the measure in the prompt and the result should display rank for the selected measure using presentation variables. For eg: If measure-A is selected, the result should be arranged in order by based on "A".
    Is it possible to sort the columns dynamically?
    Kindly help me.
    Regards,
    RB

    Hi RB,
    You can do that, though it's a bit more complicated than a simple SQL statement. For example:
    WITH BASEDATA AS (
    SELECT
      EMPNO,
      ENAME,
      MGR,
      SAL,
      COMM,
      CASE WHEN :P4_SORT_ORDER = 1 THEN
        ROW_NUMBER() OVER (ORDER BY UPPER(ENAME))
      WHEN :P4_SORT_ORDER = 2 THEN
        ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR))
      WHEN :P4_SORT_ORDER = 3 THEN
        ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR), UPPER(ENAME))
      WHEN :P4_SORT_ORDER = 4 THEN
        ROW_NUMBER() OVER (ORDER BY UPPER(ENAME) DESC)
      WHEN :P4_SORT_ORDER = 5 THEN
        ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR) DESC)
      WHEN :P4_SORT_ORDER = 6 THEN
        ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR) DESC, UPPER(ENAME) DESC)
      END SORTITEM,
      'O' STATUS
    FROM
      EMP
    SELECT
      EMPNO, 
      ENAME,
      MGR,
      SAL,
      COMM
    FROM
      BASEDATA
    ORDER BY
      SORTITEMUsing a CASE statement this assigns a ROW_NUMBER to every record based on its ordering within the selected ORDER BY clause. The output is then sorted by this value.
    Andy

  • Issue in using presentation variable as filter condition in the reports

    Hi,
    I have an issue in using presentation variable as filter condition in my reports the details are as follows:
    Details :
    We want to implement the Max and Min variables through Presentation variables only.we do not want to implement it through session variables in this case.
    We have two variables MIN and MAX to be used as Presentation Variables,for a column of the report (which is a quantity),so that the user wants to see the data for this column within a particular range.i.e the Min and the Max.This part has been implemented well . The issue is when the user wants to see the full data.In that case we will not pass any values to these two Presentation Variable or in other words we are not restricting the report data so we are not passing any value to the variables,this is when the report is throwing the error. we want to leave this variables blank in that case.but this is giving error.
    Please suggest how can I overcome this issue.
    Thanks in Advance.
    Regards,
    Praveen

    i think you have to use guided navigation for this. create two reports first is the one you are having currently and second is the one in which remove the presentation variable from the column formula. i.e. the same report with no aggregation applied.
    Now create a dummy report and make it return value only when the presentation variable value is not equal to max or min. guide the report to navigate between the first and second report based on the result of the dummy report.

  • How to use presentaion variable in the SQL statement

    Is there any special syntax to use a presentation variable in the SQL Statement?
    I am setting a presentation variable (Fscl_Qtr_Var)in the dashboard prompt.
    If i set the filter as ADD->VARIABLE->PRESENTATION, it shows the statement as 'Contract Request Fiscal Quarter is equal to / is in @{Fscl_Qtr_Var} '.
    And this works fine but when i convert this to SQL, it returns
    "Contract Request Date"."Contract Request Fiscal Quarter" = 'Fscl_Qtr_Var'
    And this does not work.It is not being set to the value in the prompt.
    I need to combine this condition with other conditions in the SQL Statement. Any help is appreciated. Thanks

    Try this: '@{Fscl_Qtr_Var}'

  • Error using presentation variable in SQL Expression

    Hi all,
    I'm receiving an error - '...Error getting drill information...' due to a presentation variable being used in a SQL Expression. It probably has something to do with a data type issue. I've narrowed the error to the use of the presentation variable.
    I'm setting a presentation variable, pres_mth_nme_to, from a dashboard prompt. The prompt contains a month name.
    I'm using the presentation variable as part of a SQL Expression in a filter. The gist of the SQL Expression is to use the
    presentation variable in a CASE and set a value accordingly. For example:
    Column: Month Sort Value
    Operator: Between
    Value: *10*
    SQL Expression: *Case  @{pres_mth_nme_to}{some default} WHEN 'NOV' THEN '10' WHEN 'DEC' THEN '11' WHEN 'JAN' THEN '12' WHEN 'FEB' THEN '13' WHEN...END*
    The month name is character. If I were to hard code this, I don't recieve the error. For example:
    CASE 'SEP' WHEN 'NOV' THEN '10' WHEN 'DEC' ...END
    There something going on with the data type from the prompt and it being used in the comparison. If I use a CAST, the problem still exists.
    CASE CAST(@{pres_mth_nme_to} as char(3)) WHEN 'NOV' THEN ... END
    If I'm in Answers, the problem doesn't exist, I'm assuming because of the default values. If I'm on the dashboard, it does exist, I'm assuming because of recieving the prompt value.
    I don't know what I'm missing. Any suggestions?
    Thanks.

    DJ,
    if the formula presented by you is exactly true, i mean it was not fabricated to present as an example in the forum, you should include the presentation variable in single quotes.
    i.e. your formula must look somthing like
    Case '@{pres_mth_nme_to}{some default}' WHEN 'NOV' THEN '10' WHEN 'DEC' THEN '11' WHEN 'JAN' THEN '12' WHEN 'FEB' THEN '13' WHEN...END
    let me know if it did solve the issue...
    -bifacts
    http://www.obinotes.com
    Edited by: bifacts on Oct 25, 2010 1:50 PM

  • OBIEE 11g:  Use presentation variable in Column Heading

    Hi everyone,
    I was playing around with sample app dashboards and I saw a dashboard prompt that they converted into a column selector. I liked it and reproduced it in my own sandbox.
    I like the results, however, I would also like to change the column heading to clearly reflect which measure was selected. It's pretty clear when you are looking in the dashboard, but once you export the data, it can be confusing which measure was selected.
    That is why I would like to use a presentation variable in the column heading section. I tried to do this but it interpreted it as a literal instead of evaluating the statement.
    Is there anyway to get a variable in the column heading?
    Thanks!
    -Joe

    Hi,
    Have a look at the following links:
    http://oraclebizint.wordpress.com/2008/01/25/oracle-bi-ee-101332-dynamic-column-headers-using-presentation-variables-sets-and-conditional-formatting/
    show the presentation variable on table column header
    Define presentation variable in column header
    hope it helps.
    Regards,
    Kalyan Chukkapalli
    http://123obi.com

  • How to set MULTIPLE repository variables using presentation variables

    Hi,
    I need to pass multiple values from presentation variable to repository.
    A brief about report design :
    I have two repository variables - from_dt and to_dt which are defaulted to some values from a database table and are editable by the user.
    I display these default date values on the dashboard. Plus there are two dashboard date prompts allowing user to enter a date range different from what is displayed by the from_dt and to_dt. The dates entered by user are assigned to presentation variables pv_from_dt and pv_to_dt.
    If user specifies a different date range then these date values are to be passed to a stored procedure which is called from the Connection Pool --> Connection Script Tab --> Execute before query. This procedure will do some calculations and populate a global temporary table before running the report.
    Problem :
    Now in the presentation server, in the Advanced tab, in the Prefix section, when i try to write something like this:
    SET VARIABLE from_dt = '@{pv_from_dt}';
    SET VARIABLE to_dt = '@{pv_to_dt}';
    I get the foll error :-
    Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SET>: Syntax error [nQSError: 26012] . (HY000)
    I tried all possible permutations and combinations
    SET VARIABLE from_dt = '@{pv_from_dt}',SET VARIABLE to_dt = '@{pv_to_dt}'; --- gave same error
    SET VARIABLE from_dt = '@{pv_from_dt}' SET VARIABLE to_dt = '@{pv_to_dt}'; -- gave same error
    How do we assign values to multiple reporsitory variables... ???
    Thanks
    Nusrat

    Hi,
    I wrongly referred to the variables as "repository" variables. Both variables are Session variables. For testing i added a column field in the report with source as the session variable - VALUEOF(NQ_SESSION.from_dt). In the Prefix section i assigned a literal value - SET VARIABLE from_dt='01-JAN-2012';
    When report is run, the literal value gets displayed.
    The idea to update a session variable, from dashboard using presentation variable, i got from the following URL.
    Go to http://oraclebizint.wordpress.com/category/obi-ee-plus/page/11/
    and see the section "Oracle BI EE 10.1.3.3/2 – Updating Session Variables from Dashboards using Presentation Variables"
    Thanks
    Nusrat
    Edited by: user10309945 on Jan 16, 2011 9:30 PM
    Edited by: user10309945 on Jan 16, 2011 9:59 PM

  • How to pass the values to stored proc using presentation variable in OBIEE

    Need your help regarding in resolving an issue in OBIEE 10.1.3.4.1
    There are 6 reports say ‘A’,’B’,’C’,’D’,’E’,’F’ in the same subject area.
    The reports are being configured with prompts using either the repository/presentation variables.
    One of the reports say ‘A’ has been configured to pass the values using presentation variables from the prompt in Advanced Tab of the report request to the stored procedure defined in the Execute Before Query section of the connection pool.
    After running another report ‘B’ in the same subject area, upon visiting the report ‘A’ view display error is being seen ( Please have a look below screen shot for your reference) .
    Speculate the issue is around presentation variables of report ‘A’ getting initialized even before running the report.
    Appreciate your earliest advise as this is a prod issue.

    Hi Prasad,
    I got your note, you should not use Session variable syntax to call presentation variable.
    you should use like @{AIC_PROJ_PLAT_SEQ_NO}
    One more thing: first test the variable AIC_PROJ_PLAT_SEQ_NO value then try to pass to SP.
    Hope this helps

  • How to use a CTE in a CASE statement?

    Hi everyone,
    I'm trying to use a CTE in a CASE statement and getting error. In fact, I'm not sure how to use a CTE in this case and this is the first time I'm using a CTE. I managed to build a CTE successfully but, failed to incorporate it in the CASE statement.
    SELECT wbs,
    MIN(srt),
    MAX(srt)
    CASE ust
    WHEN
    WITH CTE AS
    SELECT p_id + p_name + ps_name AS colg, p_id
    FROM pd_info
    WHERE s_desc = 'warehouse'
    OR p_desc = 'Originated from warehouse'
    OR p_desc = 'Originated from a partner store'
    SELECT colg FROM CTE
    WHERE cte.colg IN (SELECT p_id + p_name + ps_name AS c
    omb from pd_info)
    OR cte.p_id = 'xxxxxxxx' THEN 'invalid'
    ELSE 'valid'
    END,
    p_name,
    sub_name,
    ps_name,
    FROM pd_info;
    Could experts here please help me?
    Thank you,
    Bangaaram
    Known is a DROP, Unknown is an OCEAN.

    With the help from some experts, I've figured out that CTE doesn't work in this case. Here are the queries that I'm using for the above. Either of them is working good so far.
    SELECT Wbs
    , MIN ( Srt )
    , MAX ( Srt )
    , CASE
    WHEN S_Desc = 'warehouse'
    OR P_Desc = 'Originated from warehouse'
    OR P_Desc = 'Originated from a partner store'
    OR P_Id = 'xxxxxxxx'
    THEN 'invalid'
    ELSE 'valid'
    END AS Ust
    , P_Name
    , Sub_Name
    , Ps_Name
    FROM Pd_Info
    GROUP BY Wbs
    , CASE
    WHEN S_Desc = 'warehouse'
    OR P_Desc = 'Originated from warehouse'
    OR P_Desc = 'Originated from a partner store'
    OR P_Id = 'xxxxxxxx'
    THEN 'invalid'
    ELSE 'valid'
    END
    , P_Name
    , Sub_Name
    , Ps_Name;
    SELECT wbs,
    MIN(srt),
    MAX(srt)
    CASE
    WHEN cte.p_id = 'xxxxxxxx'
    or exists
    (select *
    from pd_info p2
    WHERE (s_desc = 'warehouse'
    OR p_desc = 'Originated from warehouse'
    OR p_desc = 'Originated from a partner store' )
    and p2.p_id = p1.p_id and p2.p_name = p1.p_name and p2.ps_name = p1.ps_name
    THEN 'invalid'
    ELSE 'valid'
    END ust,
    p_name,
    sub_name,
    ps_name,
    FROM pd_info p1;
    Thank you,
    Bangaaram
    Known is a DROP, Unknown is an OCEAN.

  • Delete statement that uses a sub-select with the statement in the cursor

    Hi all,
    How to write write a delete statement that uses a sub-select with the statement in the cursor?
    CURSOR excluded_dates IS         
           SELECT TO_TIMESTAMP(report_parameter_value, in_date_format_mask)
          INTO my_current_date_time
          FROM report_parameters
         WHERE report_parameters.report_parameter_id    = in_report_parameter_id
           AND report_parameters.report_parameter_group = 'DATE_TIME'
           AND report_parameters.report_parameter_name  = 'EXCLUDED_DATE';
    OPEN excluded_dates;
      LOOP
        FETCH excluded_dates INTO my_excluded_date;
        EXIT WHEN excluded_dates%NOTFOUND;
        DELETE FROM edr_rpt_tmp_inclusion_table
        WHERE TO_CHAR(date_time, 'mm/dd/yyyy') = TO_CHAR(my_excluded_date, 'mm/dd/yyyy');
      END LOOP;
      CLOSE excluded_dates;Thanks

    Hi,
    In such case I think is better to create a view an perform the delete using it. Example (using HR schema):
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> create or replace view v_employees as select * from employees where first_name like 'J%';
    View created
    SQL> select * from v_employees;
    EMPLOYEE_ID FIRST_NAME           LAST_NAME                 EMAIL                     PHONE_NUMBER         HIRE_DATE   JOB_ID         SALARY COMMISSION_PCT MANAGER_ID DEPARTMENT_ID
            110 John                 Chen                      JCHEN                     515.124.4269         28/09/1997  FI_ACCOUNT    8200,00                       108           100
            112 Jose Manuel          Urman                     JMURMAN                   515.124.4469         07/03/1998  FI_ACCOUNT    7800,00                       108           100
            125 Julia                Nayer                     JNAYER                    650.124.1214         16/07/1997  ST_CLERK      3200,00                       120            50
            127 James                Landry                    JLANDRY                   650.124.1334         14/01/1999  ST_CLERK      2400,00                       120            50
            131 James                Marlow                    JAMRLOW                   650.124.7234         16/02/1997  ST_CLERK      2500,00                       121            50
            133 Jason                Mallin                    JMALLIN                   650.127.1934         14/06/1996  ST_CLERK      3300,00                       122            50
            139 John                 Seo                       JSEO                      650.121.2019         12/02/1998  ST_CLERK      2700,00                       123            50
            140 Joshua               Patel                     JPATEL                    650.121.1834         06/04/1998  ST_CLERK      2500,00                       123            50
            145 John                 Russell                   JRUSSEL                   011.44.1344.429268   01/10/1996  SA_MAN       14000,00           0,40        100            80
            156 Janette              King                      JKING                     011.44.1345.429268   30/01/1996  SA_REP       10000,00           0,35        146            80
            176 Jonathon             Taylor                    JTAYLOR                   011.44.1644.429265   24/03/1998  SA_REP        8600,00           0,20        149            80
            177 Jack                 Livingston                JLIVINGS                  011.44.1644.429264   23/04/1998  SA_REP        8400,00           0,20        149            80
            181 Jean                 Fleaur                    JFLEAUR                   650.507.9877         23/02/1998  SH_CLERK      3100,00                       120            50
            186 Julia                Dellinger                 JDELLING                  650.509.3876         24/06/1998  SH_CLERK      3400,00                       121            50
            189 Jennifer             Dilly                     JDILLY                    650.505.2876         13/08/1997  SH_CLERK      3600,00                       122            50
            200 Jennifer             Whalen                    JWHALEN                   515.123.4444         17/09/1987  AD_ASST       4400,00                       101            10
    16 rows selected
    SQL> delete from v_employees where hire_date >= to_date('01/06/1998', 'dd/mm/yyyy');
    2 rows deleted
    SQL> regards,

  • 11g outer join with case statement - strange results.

    Hello All,
    I am experiencing a strange issues in 11g while using case statement.
    I am not able to reproduce this using sample data. Not sure what is wrong.
    I am not narrowing it to say the usage of case statemnt is giving wrong results, but that is my observation when I am doing trail and error testing.
    Here are the details.
    My Version
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    SQL> My Query
    SELECT *
      FROM (SELECT DISTINCT mf.schedule,
                            mf.cptcode,
                            NVL (mf.modifier, '00') modifier2,
                            CASE
                               WHEN mf.feetype = 'H'
                                AND mf.multiplier IS NOT NULL THEN
                                  '      0.00'
                               WHEN (mf.feetype != 'H'
                                  OR  mf.feetype IS NULL)
                                AND mf.rbrvsvalue IS NOT NULL
                                AND mf.multiplier IS NOT NULL THEN
                                  LPAD ( TRIM (TO_CHAR ( (mf.rbrvsvalue * mf.multiplier) / 100, 9999999.99)), 10)
                               ELSE
                                  NULL
                            END
                               fee
              FROM provider.mpifee mf, mpi_udffee.udffeeactivecptcodes vld
             WHERE mf.schedule = 'SAPG1'
               AND mf.cptcode = vld.cptcode
               AND NVL (mf.modifier, 'NULL') = NVL (vld.modifier, 'NULL')) inline_fee,
           (SELECT arc.schedule col1, arc.procedurecode col2, NVL (arc.modifier, '00') AS col3
              FROM mpi_udffee.udffeeancfeedata arc
             WHERE monthofextract = '201202'
               AND arc.schedule = 'SAPG1'
               AND TRUNC (SYSDATE - 10) BETWEEN arc.recordeffectivedate AND arc.recordterminationdate) inline_data
    WHERE inline_fee.schedule = inline_data.col1(+)
       AND inline_fee.cptcode = inline_data.col2(+)
       AND inline_fee.modifier2 = inline_data.col3(+);
    In the above query the inline view inline_data returns zero rows. but NVL is still getting applied for col3 and I am getting 00 in the results( strange ).
    Results:
    SCHEDULE        CPTCO MODIFIER2  FEE             COL1  COL2  COL3
    SAPG1           49590 00             667.32                  00
    SAPG1           49611 00             781.03                  00
    SAPG1           49905 00             443.79                  00
    SAPG1           50205 00             883.56                  00
    SAPG1           50220 00            1315.15                  00
    SAPG1           50230 00            1638.74                  00
    SAPG1           50234 00            1666.16                  00
    SAPG1           50250 00            1566.14                  00
    SAPG1           50327 00             262.04                  00
    SAPG1           50541 00            1183.31                  00
    SAPG1           50620 00            1156.88                  00
    SAPG1           50650 00            1321.96                  00
    497 rows selected.
    Just the inline view inline_data,
    SQL> SELECT arc.schedule col1, arc.procedurecode col2, NVL (arc.modifier, '00') AS col3
      2            FROM mpi_udffee.udffeeancfeedata arc
      3           WHERE monthofextract = '201202'
      4             AND arc.schedule = 'SAPG1'
      5             AND TRUNC (SYSDATE - 10) BETWEEN arc.recordeffectivedate AND arc.recordterminationdate;
    no rows selectedMuch unusual thing is when I just remove the case statement from the inline view "inline_fee", I am getting right results,
    SELECT *
      FROM (SELECT DISTINCT mf.schedule,
                            mf.cptcode,
                            NVL (mf.modifier, '00') modifier2          <-- Removed Case statement here
              FROM provider.mpifee mf, mpi_udffee.udffeeactivecptcodes vld
             WHERE mf.schedule = 'SAPG1'
               AND mf.cptcode = vld.cptcode
               AND NVL (mf.modifier, 'NULL') = NVL (vld.modifier, 'NULL')) inline_fee,
           (SELECT arc.schedule col1, arc.procedurecode col2, NVL (arc.modifier, '00') AS col3
              FROM mpi_udffee.udffeeancfeedata arc
             WHERE monthofextract = '201202'
               AND arc.schedule = 'SAPG1'
               AND TRUNC (SYSDATE - 10) BETWEEN arc.recordeffectivedate AND arc.recordterminationdate) inline_data
    WHERE inline_fee.schedule = inline_data.col1(+)
       AND inline_fee.cptcode = inline_data.col2(+)
       AND inline_fee.modifier2 = inline_data.col3(+);
    SCHEDULE        CPTCO MODIFIER2  COL1  COL2  COL3
    SAPG1           46730 00
    SAPG1           46735 00
    SAPG1           46748 00
    SAPG1           46760 00
    SAPG1           46942 00
    SAPG1           46945 00
    SAPG1           47015 00
    SAPG1           47125 00
    SAPG1           47350 00
    SAPG1           47505 00
    SAPG1           47553 00interestingly explain plan for both the statements are exactly same,
    SELECT STATEMENT  ALL_ROWSCost: 138  Bytes: 1,078,274  Cardinality: 11,471                                
         9 HASH JOIN RIGHT OUTER  Cost: 138  Bytes: 1,078,274  Cardinality: 11,471                           
              2 PARTITION RANGE EMPTY  Cost: 2  Bytes: 150  Cardinality: 3                      
                   1 TABLE ACCESS FULL TABLE MPI_UDFFEE.UDFFEEANCFEEDATA Cost: 2  Bytes: 150  Cardinality: 3                 
              8 VIEW MPI_UDFFEE. Cost: 135  Bytes: 504,724  Cardinality: 11,471                      
                   7 HASH UNIQUE  Cost: 135  Bytes: 539,137  Cardinality: 11,471                 
                        6 HASH JOIN  Cost: 134  Bytes: 539,137  Cardinality: 11,471            
                             3 TABLE ACCESS FULL TABLE MPI_UDFFEE.UDFFEEACTIVECPTCODES Cost: 13  Bytes: 177,345  Cardinality: 25,335       
                             5 PARTITION LIST SINGLE  Cost: 120  Bytes: 600,600  Cardinality: 15,015  Partition #: 8       
                                  4 INDEX RANGE SCAN INDEX (UNIQUE) REPRICE.PK_MPIFEE Cost: 120  Bytes: 600,600  Cardinality: 15,015  Partition #: 9  Partitions accessed #11Is there anything wrong with the query? If not have anyone come across this issue or posted it as a bug or is there a patch?
    Update:
    when I set the parameter "_complex_view_merging"=false I am getting the right results even with case statement. But I don want to do some thing unsupported.
    Are there any other viable solutions?
    I appreciate the help.
    Thanks,
    G.
    Edited by: Ganesh Srivatsav on Apr 10, 2012 12:37 PM

    Hi Tubby,
    Right, the query transformation is going wrong. Following is from trace,
    SELECT "INLINE_FEE"."SCHEDULE" "SCHEDULE",
           "INLINE_FEE"."CPTCODE" "CPTCODE",
           "INLINE_FEE"."MODIFIER2" "MODIFIER2",
           "INLINE_FEE"."FEE" "FEE",
           "ARC"."SCHEDULE" "COL1",
           "ARC"."PROCEDURECODE" "COL2",
           CASE
              WHEN "ARC".ROWID IS NOT NULL THEN NVL ("ARC"."MODIFIER", '00')
              ELSE NULL
           END
              "COL3"
      FROM (SELECT DISTINCT "MF"."SCHEDULE" "SCHEDULE",
                            "MF"."CPTCODE" "CPTCODE",
                            NVL ("MF"."MODIFIER", :B2) "MODIFIER2",
                            CASE
                               WHEN ("MF"."FEETYPE" = :B3
                                 AND "MF"."MULTIPLIER" IS NOT NULL) THEN
                                  :B4
                               WHEN ( ("MF"."FEETYPE" <> :B5
                                    OR  "MF"."FEETYPE" IS NULL)
                                 AND "MF"."RBRVSVALUE" IS NOT NULL
                                 AND "MF"."MULTIPLIER" IS NOT NULL) THEN
                                  LPAD ( TRIM (TO_CHAR ( "MF"."RBRVSVALUE" * "MF"."MULTIPLIER" / :B6, :B7)), :B8)
                               ELSE
                                  NULL
                            END
                               "FEE"
              FROM "PROVIDER"."MPIFEE" "MF", "MPI_UDFFEE"."UDFFEEACTIVECPTCODES" "VLD"
             WHERE "MF"."SCHEDULE" = 'SAPG1'
               AND "MF"."CPTCODE" = "VLD"."CPTCODE"
               AND NVL ("MF"."MODIFIER", 'NULL') = NVL ("VLD"."MODIFIER", 'NULL')) "INLINE_FEE",
           "MPI_UDFFEE"."UDFFEEANCFEEDATA" "ARC"
    WHERE "INLINE_FEE"."SCHEDULE" = "ARC"."SCHEDULE"(+)
       AND "INLINE_FEE"."CPTCODE" = "ARC"."PROCEDURECODE"(+)
       AND "INLINE_FEE"."MODIFIER2" = CASE
                                         WHEN ("ARC".ROWID(+) IS NOT NULL) THEN NVL ("ARC"."MODIFIER"(+), '00')
                                         ELSE NULL
                                      END
       AND "ARC"."MONTHOFEXTRACT"(+) = '201202'
       AND "ARC"."SCHEDULE"(+) = 'SAPG1'
       AND TRUNC (SYSDATE-10) >= "ARC"."RECORDEFFECTIVEDATE"(+)
       AND TRUNC (SYSDATE-10) <= "ARC"."RECORDTERMINATIONDATE"(+)Does this refer to a specific bug?
    Thanks,
    G.

  • Unable to pass the values to stored proc using presentation variable in OBI

    Hi All,
    Need your help regarding in resolving an issue in OBIEE 10.1.3.4.1
    There is an OBIEE requirement whereby two prompts need to be defined.
    1.     Textbox prompt
    2.     Drop-down prompt
    The dropdown values should be populated using textbox prompt. So, we have used presentation variable in textbox prompt and passing the same to select query of drop-down.
    Until this step, the report works just fine.
    Now, the value in both textbox and drop-down needs to be passed to stored proc.
    While trying to pass the values by using the presentation variable, the following error comes-up saying
    Session variable has no value definition.
    Note:Although the corresponding session variable has been set to default value,still the error appears.
    Please advise.
    Regards,
    Prasad

    "Session variable has no value definition" I'm assuming typo error and it should be presentation variable.
    Set default value for presentation variable that may work

  • I am having difficulty including text with iPhotos I want to share through email.  I get a red exclamation mark along with a statement stating that the text doesn't fit into the designated text area.  This is so frustrating.

    I am having difficulty including text with iPhotos I want to share through email.  I get a red exclamation mark along with a statement stating that the text doesn't fit into the designated text area.  This is so frustrating. Before iLire11 I was easily able to share photos with email messages.  Arghhhh!

    In the iPhoto preferences you can set Apple Mail as your e-mail client and then it will work exactly as before
    LN

  • Help to use presentation variables in title view

    Hi,
    I am trying to use presentation variables in title view and the presntation variable that I have created is for current month date range (04/01/2012-04/30/2012)
    When I am using this variable in the title view in the report it is showing me as (04/01/2012,04/30/2012)
    IS there any way to get the date range as 04/01/2012-04/30/2012 instead of comma

    863997 wrote:
    Hi,
    I can not create two presenation variables and use becasue I have dashboard prompts setted up and I am using that prompt in my dashboard and report to..So if I create two presentation variables seaperately and use then whenever we change the dates in the prompts the dates in the reprot title will not changeYou absolutely can use two presentation variables and they will change in the Title View if you use them there. Click on this link for the details on how to create the two prompts and use them in your report.
    http://oraclebizint.wordpress.com/2008/02/26/oracle-bi-ee-101332-between-prompts-for-date-columns-using-presentation-variables/

Maybe you are looking for

  • While running servlets getting errors 404 or 505 resource not found

    Hi all, I'm novice to J2EE. I've encountered a problem while accessing the deployed module in weblogic 8.1 server. I'm sure that the webapplication module is deployed as i saw my module in administration console & also the status said that it is depl

  • Drag and drop does not work in firefox 3

    Does anybody has the same issue with firefox when you add a layout to the oracle composer and you want to drag and drop some components that it just does not work... When i hoover over the title bar of a component i see the cross icon but the drag &

  • Can't Accept Acrobat XI EULA

    I've upgraded to Acrobat XI Pro via Creative cloud. Whenever I lauch the application I am presented with a blank license agreement screen and a non-functional accept button. I can only use the application for a few seconds before this happens on my O

  • Sorting a varchar2 field in Report 10g

    Dear all, i have a table of salaries, which have a field RANK_NO VARACHAR2. I create a report and order it by RANK_NO. but it is not ordering what i want to be. it is ordered like 1 10 11 2 3 4 5 6 7 8 9 then i use the order by cluase like this, ORDE

  • Cannot paste text into Dreamweaver after the fancy new version changes

    After the latest update I can no longer paste text into dreamweaver.  I'm sure it's because of some corrupted file but don't know where to find and make that correction. Thanks Adobe, really appreciate it.