CASE STATEMENT DOES NOT HIERARCHY

Hi Experts

I have this case statement:

BOX WHEN ' @{pvCalType} "="Cal1"THEN"Calendar Cal1"". "" Year. "

WHEN ' @{pvCalType} "="Cal2"THEN"Calendar Cal2"". "" Year

ANOTHER NULL

END

All the columns in the YEAR of different sizes have properties of the hierarchy.

When I view my results of this statement, there is no hierarchy.

I want the hierarchy in order to drill down of the YEAR > QUARTER > MONTHS

Help, please.

Hello

do you have other possible values for "pvCalType"?

If not try this formula: "@{pvCalType} schedule". " Year. "

(not sure this is the right syntax, if it does not work after the return of the error and I get the right thing...)

Tags: Business Intelligence

Similar Questions

  • Case statement does not work

    Dear all,

    We have the database oracle 11g r2 on windows.

    I created under function: -.

    SQL > CREATE OR REPLACE FUNCTION FUNC_TEST (P_TEST VARCHAR2)

    2 RETURN VARCHAR2

    3 AS

    4 V_TEST VARCHAR2 (20);

    5

    6 BEGIN

    7

    8 V_TEST: = P_TEST;

    9

    10

    11 CASES

    12. WHEN V_TEST = UPPER ('%UU%') THEN V_TEST: = REPLACE (V_TEST, 'UU', 'U');

    13. WHEN V_TEST = UPPER ('%OO%') THEN V_TEST: = REPLACE (V_TEST, 'OO', 'O');

    14. WHAT V_TEST = UPPER ('%NN%') THEN V_TEST: = REPLACE(V_TEST,'NN','N');

    15 ELSE V_TEST: = "CHANCHAL";

    END 16 CASES;

    17

    18

    19 V_TEST RETURN;

    20 EXCEPTION SO THAT OTHERS THEN

    21 DBMS_OUTPUT. PUT_LINE (' THERE IS AN ERROR ');

    22 END;

    23.

    The function is created.

    SQL > SHOW ERR

    No errors.

    SQL > SELECT FUNC_TEST('toon') FROM DUAL;

    FUNC_TEST ('TOON')

    --------------------------------------------------------------------------------

    CHANCHAL

    above function should show 'YOUR' build 'Toon' but its display "CHANCHAL";

    I train hard get the result OK but could not get it.

    Any suggestions would be very helpful.

    Kind regards
    Chanchal wankhade.

    Hello

    Chanchal Wankhade wrote:

    Dear all,

    We have the database oracle 11g r2 on windows.

    I created under function: -.

    SQL > CREATE OR REPLACE FUNCTION FUNC_TEST (P_TEST VARCHAR2)

    2 RETURN VARCHAR2

    3 AS

    4 V_TEST VARCHAR2 (20);

    5

    6 BEGIN

    7

    8 V_TEST: = P_TEST;

    9

    10

    11 CASES

    12. WHEN V_TEST = UPPER ('%UU%') THEN V_TEST: = REPLACE (V_TEST, 'UU', 'U');

    13. WHEN V_TEST = UPPER ('%OO%') THEN V_TEST: = REPLACE (V_TEST, 'OO', 'O');

    14. WHAT V_TEST = UPPER ('%NN%') THEN V_TEST: = REPLACE(V_TEST,'NN','N');

    15 ELSE V_TEST: = "CHANCHAL";

    END 16 CASES;

    17

    18

    19 V_TEST RETURN;

    20 EXCEPTION SO THAT OTHERS THEN

    21 DBMS_OUTPUT. PUT_LINE (' THERE IS AN ERROR ');

    22 END;

    23.

    The function is created.

    SQL > SHOW ERR

    No errors.

    SQL > SELECT FUNC_TEST('toon') FROM DUAL;

    FUNC_TEST ('TOON')

    --------------------------------------------------------------------------------

    CHANCHAL

    above function should show 'YOUR' build 'Toon' but its display "CHANCHAL";

    I train hard get the result OK but could not get it.

    Any suggestions would be very helpful.

    Kind regards
    Chanchal wankhade.

    I think you meant:

    CASE

    WHEN SUPERIOR (V_TEST) LIKE "% UU" THEN V_TEST: = REPLACE (UPPER (V_TEST), 'UU', 'U');

    WHEN SUPERIOR (V_TEST) LIKE '% OO %' THEN V_TEST: = REPLACE (UPPER (V_TEST), 'OO', 'O');

    ...

    '%' is a wildcard character only on the right-hand side of the LIKE operator. '%' has no particular meaning when you use the = operator.

    You can also use a CASE expression, rather than a CASE statement to this:

    v_test: = UPPER (p_test);

    v_test: = BOX

    WHEN v_test LIKE "% UU" THEN REPLACE (v_test, 'UU', 'U')

    WHEN v_test LIKE "% UU" THEN REPLACE (v_test, 'OO', 'o')

    ...

    END;

    Whatever it is, if v_test contains different models (for example "HOOVER VACUUM"), only 1 of them will be changed.  Is that what you want?

    If this isn't the case, after a few examples of data (CREATE TABLE and INSERT statements) and the results desired from these sample data.  Explain how you get these results from these data.

    See the FAQ forum: https://forums.oracle.com/message/9362002#9362002

  • NOT IN clause in State of the CASE statement does not

    Dear friends,

    I want to use on the condition in the WHERE clause of my SELECT statement.

    WHERE <>...
    <>...
    AND eihf.exr_aip_asset_sid NOT IN
    (CASE when safa.fund_relation = 'C' and safa.fund_account_code! = vFundAccount)
    SO (37874,37909,43424,55040,59513,59598,58570,76148,75885,75927)
    ON THE OTHER
    (0)
    END
    )

    But it gives me an error like "missing of good parenthis."

    Help, please.

    Kind regards
    Jonathan

    You can not write a list of values within the case statement.

    try something like this,

     WHERE
    <------------->
       AND CASE WHEN safa.fund_relation = 'C' AND safa.fund_account_code != vFundAccount
             THEN eihf.exr_aip_asset_sid ELSE 1 END
           NOT IN (37874, 37909, 43424, 55040, 59513, 59598, 58570, 76148, 75885, 75927)
       AND CASE WHEN safa.fund_relation = 'C' AND safa.fund_account_code != vFundAccount
             THEN 1 ELSE eihf.exr_aip_asset_sid  END != 0;
    
  • using nested case statement does not get the right result

    Hello all;

    I have a sample of data similar to below
    create table t3
    ( 
           id varchar2(200),
           qty number(30),
           qty2 number(30)
    ); 
     insert into t3
       (id, qty, qty2)
     values
       ('A', 10, null);
     
      insert into t3
       (id, qty, qty2)
     values
       ('A', 20, null);
       
     insert into t3
       (id, qty, qty2)
     values
       ('B', null, 5);
       
    insert into t3
       (id, qty, qty2)
     values
       ('B', null, 5);
       
     insert into t3
       (id, qty, qty2)
     values
       ('C', null, -5);
       
    insert into t3
       (id, qty, qty2)
     values
       ('C', null, 5);
    
    
     insert into t3
       (id, qty, qty2)
     values
       ('D', -1, -2);
       
    insert into t3
       (id, qty, qty2)
     values
       ('D', 1, 4);
    This is what looks like data
    ID  QTY  QTY2
    A    10
    A    20
    B              5
    B              5
    C             -5
    C              5
    D    1        4
    D   -1       -2
    It is the output that I desired below
    ID    Status 
    A      Fail
    B      Fail
    C      Pass
    D      Fail
    A is a failure because the sum of the 2 has the value zero, where the summation of the qty was used to determine the State and because the sum of the quantity is not equal to zero, then, it is a failure
    D is a failure because even if the sum of the Qty 1 equals zero, we must make use of summation of the qty 2 instead because he is not null to determine the status and the summation of the qty is 2, where a failure
    etc.

    I tried write something but can not make it work
    select case when sum(v.qty) is not null
                and sum(v.qty) = 0 then 'Pass'
                when sum(v.qty) is not null
                and sum(v.qty) != 0 then 'Fail'
           else
             case when sum(v.qty2) is not null
               and sum(v.qty2) = 0 then 'Pass'
               else
                when sum(v.qty2) is not null 
                  and sum(v.qty2) != 0 then 'Fail'
                  end as status
              end as status
    
    
     from t3 v;
    any help is appreciated. Thank you.

    Try this,

    SELECT ID,
           CASE WHEN NVL(SUM (qty2),1) !=0 THEN 'fail'
                WHEN NVL(SUM (qty),0) != 0 THEN 'fail'
                ELSE 'pass'
           END
      FROM t3
    GROUP BY ID
    
    OUTPUT
    -------------
    
    ID RESULT
    -- ------
    A  fail
    B  fail
    C  pass
    D  fail
    Z  fail
    

    G.

  • Active state does not properly in Chrome

    Hello

    I recently exported the site I created in HTML and everything seems to work well. The only problem I encounter is that active State does not work in Chrome. When I scroll to the bottom of the page, the color of the active state is not reflected. This does not work in IE, Safari and Firefox. Really need this to be resolved soon. Help, please!

    Thank you!

    Ryan

    Hi whyax84 and Zak.

    Download Yes it indeed solved the problem for chrome. Thank you very much!

    Kelvin

  • ORA-13780: SQL statement does not exist

    Hello
    on the 11g R2, I get the following message:
    SQL> variable stmt_task VARCHAR2(64);
    SQL> EXEC :stmt_task := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id => 'gh9p77g1fr0kd');
    BEGIN :stmt_task := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id => 'gh9p77g1fr0kd'); END;
    
    *
    ERROR at line 1:
    ORA-13780: SQL statement does not exist.
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
    ORA-06512: at "SYS.PRVT_SQLADV_INFRA", line 125
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 655
    ORA-06512: at line 1
    Any idea?

    Thank you.

    Sql and the sql_id execution plan has been emptied out of the shared pool, so oracle could not find it.

    -Thank you

  • Rollover State does not not on active state

    Hi, I have a problem with the menu States. The rollover State does not work when a menu item is in its active state. This is supposed to happen or is there a solution to this?

    Thank you.

    Hello

    This works as expected. Active state removes change it to any other State on the interaction of the mouse and other States work only on the links that are currently in Normal condition.

    See also: https://forums.adobe.com/thread/1136562

    See you soon,.

    Vikas

  • Menu rollover State does not have the button active parent

    My menu rollover State does not work the button parent in my menu while I'm on a page of the child. I didn't have any currently active States in the menu. How can I get the parent menu to respect the rollover State even while I'm on one of the child pages?

    Please check this thread:

    https://forums.Adobe.com/message/6148234#6148234

    Thank you

    Sanjit

  • Delete statement does not work properly

    Hello

    The following delete statement does not work correctly.
    If I press DELETE will delete everything in the table of categories
    I don't know whats wrong with it.
    -Delete category line if there is not the infrastructure to support-
    IF: P12_DFCY_SEQNO4 IS NOT NULL AND: P12_DFCY_CATG_C = "7" THEN
    REMOVE FROM DFCY_CATG
    IF NOT EXISTS (SELECT I.DFCY_SEQNO
    OF DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND: P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;

    Thank you
    Mary

    You probably the where more clause:

    DELETE FROM DFCY_CATG
    WHERE C.DFCY_SEQNO = :P12_DFCY_SEQNO4
    AND NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    

    Not sure if this is the exact name of your column in the table, but that limit the scope of deleting just a record that you control.

    Hope it will be useful,

    Aaron

  • Why this CASE statement would not work?

    If I use a CASE in my SELECT statement and met a strange thing and just need help to understand why he did it.

    When I type this, it does not work:

    CASE TRIM (Column1)
    WHEN NULL THEN Column2
    WHEN 'foo' THEN Column2
    Of ANOTHER Column1
    END AS NewColName

    I use this query in an Oracle procedure to insert data into another table. The data inserted in the column of NewColName end up being 4 empty spaces, located in Column1. In the logic of this, TRIM must remove all the empty spaces, and he should get mapped to the first statement WHEN, who must insert the value of Column2, but that does not occur. I tried the following versions of the first line as well:

    LTRIM (RTRIM (Column1)) CASE
    CASE of REPLACE (Column1, ' ', ")

    and they all produce the same result. I also tried to change WHEN NULL for WHEN " and it changed nothing. However, when I rewrite the statement in this way it works the way it should:

    CASE
    WHEN TRIM (Column1) IS NULL, Column2
    WHEN TRIM (Column1) = 'foo' THEN Column2
    Of ANOTHER Column1
    END AS NewColName

    In my mind, it seems that these two methods are trying the same thing, why we could work and the other not? Only, it has no sense to me.

    Thank you

    Hello

    Welcome to the forum.

    In your first statement, you have

    WHEN NULL THEN.

    This is the same as x = NULL.

    Nothing is never equal to NULL, if you find yourself in your ELSE clause.

    Concerning
    Peter

  • Case statement is not spend.

    Hello

    I'm having a strange problem with a case statement.  I'm passing is a Boolean value that is set to false, but the case statement never switches to the loop of "false".  I have attached a word doc who did the screen has a step of this unique through being shot.  The photo of the top has the case highlighted with the probe #8 beside him indicate 'False. '  In the lower screen shot is the very next step that highlights the outside circle while ' loop', but the case statement is always 'True '.  Anyone seen this before?

    Gary Tyrna

    Hey Mello,

    Well, I see what you're saying and you are right, the problem is the case statement works when highlight of execution.  But I have a main case statement in the loop that either allows the state machine to execute a loop or hides them and that case is triggered for no steps to true or false.  So that was the reason why I sent the first e-mail because I could see this case change, but not the smallest.  But if this is the fix well I'll run with it and lets see case statement switch the highlight of the performance.

    Thanks again.

    Gary Tyrna

  • Widget API Find: regex case sensitive does not work

    I try to use the blackberry.find and the blackberry.pim.Contact Widget API to search for a contact.

    I need the contact can be found if the specified filter string is anywhere in the field, regardless of case.  (I need the query to be case insensitive).

    I have a contact, field firstName = 'Norman '.

    I use method REGEX (the only one that might work in this case, I think), with these expressions regex to match "Norman":

    «. * Norm.*' matches

    «. * norm.*"does not match

    So I tried the regex (? I) indicator in the expression, and the discovery does not at all.

    var fe = new blackberry.find.FilterExpression("firstName", "REGEX", ".*(?i)norm.*"); // causes blackberry.pim.Contact.find() to fail
    

    The API doc says "Please refer to java.lang.String.matches () API for more information on the creation of the regular expression correct... "Well, case has been there for some time.

    Case is not supported? If not, well... which sucks.

    I had asked one of the guys on the team who had some difficulty getting case capacity for work.  It came with a work around that is just a bit hacky, but did the trick

    var hack = "";
    var searchText = searchField.value;for (var i = 0; i < searchField.value.length; i++)
    {
      hack = hack + "[" + searchField.value[i].toLowerCase() + searchField.value[i].toUpperCase() + "]";
    }
    
    var fe = new blackberry.find.FilterExpression("firstName", "REGEX", hack + "[a-zA-Z_0-9_\\s]*");
    
    var contacts = blackberry.pim.Contact.find(fe, "firstName", null, null, true);
    

    They created a character set which contained both lowercase and uppercase letter.

  • When I right click on a pohto (set as background on your desktop) statement does not appear

    I am using windows 7 starter edition.

    When I right click on a personal photo statement, appearing as a background does not appear, so I am unable to put my favorite as a background picture.

    I appriciate if you would kindly solve this problem

    Windows 7 Starter Edition does not have the wallpaper to change - its design and not a problem with your PC.

    If you want this installation, you can either use the 3rd party hacks/software (which I do not recommend) or pay for an upgrade to a higher edition of Windows 7 Home Premium.

  • Captivate 9 Drag and Drop DropIncorrect State does not

    Hello!

    I ve done a Drag and Drop interaction, where I have 4 targets and 4 drag only one correct answer for each of the sources. I've added States for Drop targets:

    DropCorrect State, The target turns Green when pressing submit, and the answer is correct.

    DropIncorrect State, target Drop becomes Red when press submit and answer is incorrect.

    I thought that it would be a good way to show the user which targets Drop are correct and which aims to drop they must change to get the right answer.

    When the answer is correct, Drop targets turns green and I made an action that says "OK, click anywhere to continue."

    BUT when the answer is wrong, nothing happens to the colors of the Drop target. It s just a failed, Try Again message. Nothing more.

    Why isn´t the State DropIncorrect showing when I press the submit button and the answer is incorrect?

    I just checked the file of this article, which was created on an earlier version of 9 and it works well also for the State of DropInCorrect, but I have only 1 attempt! I suspect that your endless attempts are the cause of the DropIncorrect does not. Compare it with actions on a question slide: success action will be performed when the answer is correct, but the other action will be done only at the last attempt is finished and the answer is wrong. Since you have endless attempts, this last attempt event never occurs.

    Sorry for the late reply, wanted to check a second time and has been very busy today.

  • With multi-page session state does not save

    Hello

    I built an online form using apex that has 4 pages. The first 3 pages save in a session state on the last page running a process that inserts the data of 4 pages in the table. The first 3 pages are set to present an update of SQL.

    The issue I'm having is that when I want to go back to a page within the session using the previous buttons, I created, the values of the previous page is no longer present in the fields (all fields are now empty). I got to the origin of the previous button to submit and then redirect to the previous page when clicking on the value. Then I tried just to set the button to redirect to the previous page without presenting and then it does not still work. Anyone know what could be causing this? Your help is very appreciated.

    Thank you
    MICAH

    Hi Mika,

    Have you checked the source of the page elements in your form to make sure that they are not using "Always replace any value stored in session state". If this field is selected in the menu drop-down, then they will be wiped off.

    Thank you

    Paul

Maybe you are looking for

  • iPhone music

    Within the last week my music on the 5s iphone app started to mix all my albums, but also playlists.  Nothing I've tried works to stop the madness of shuffle and it drives me crazy.  I searched youtube and various resolution forums and nothing works.

  • Call free recording App

    Hi all Is there any application for registration of free calls to Iphone? Android supports a lot of apps, devices last windows 950 also built App. Why cant IOS support?

  • Impossible to print as it says 0 Documents pending for printing with Deskjet 970 Cxi printer

    Original title: my Deskjet 970 Cxi printer Guys need help,I downloaded the driver for the printer and everything is installed. He is also said to be ready to use, but when I give the Print Option, it always shows 0 Documents waiting to print. Please

  • I am able to receive emails, when you send emails I get the following message: the connection to the server has failed.

    When sending emails, I get follow-up messages: The connection to the server has failed. Object "try again"Server: 'smtp.comcast.net '.Windows Live Mail error ID: 0x800CCC0EProtocol: SMTPPort: 25Secure (SSL): YesSocket error: 10013

  • on the xp computer virus infection

    * - Original title - corrupt protected windows files I bought a used computer and it turns out he had a virus which damaged protected windows file. It did come with an xp disk. If I buy a new program windows that will fix my problem or the virus stil