Chanllenging task  in hierarchial queries

I have a table sk_main
create table sk_main(empno number, mgr number)
insert into sk_main values (1,null);
insert into sk_main values (2,1);
insert into sk_main values (3,1);
insert into sk_main values (4,2);
insert into sk_main values (6,2);
insert into sk_main values (5,3);
Another Table
create table sk_recalc(id number, tag_val varchar2(1000))
Initially table is loaded like this,
insert into sk_recalc
select rownum,ltrim(sys_connect_by_path(empno,'\'),'\') from sk_main
start with mgr is null
connect by prior empno=mgr;
Output1:
ID|TAG_VAL
1|1
2|1\2
3|1\2\4
4|1\2\6
5|1\3
6|1\3\5
Now assume below DML's Happened to sk_main table,
insert into sk_main values(7,2);
update sk_main set mgr=7 where empno=4
so now tag_val's become
Output2:
ROWNUM|LTRIM(SYS_CONNECT_BY_PATH(EMPNO,'\'),'\')
1|1
2|1\2
3|1\2\6
4|1\2\7
5|1\2\7\4
6|1\3
7|1\3\5
now if we see output1 and output2,
sk_recalc() output is below before dml operations to sk_main table, after dml operations, sk_recalc() table should get update for those records which are different
Output1:
ID|TAG_VAL
1|1
2|1\2
3|1\2\4
4|1\2\6
5|1\3
6|1\3\5
and after dml operations sk_recalc() table should get update for those records which are different after dml operations, for example
1,1\2,1\2\6,1\3,1\3\5 are same before and after dml operations so this id's should not change in sk_recalc table,
1\2\4 will become 1\2\7 and 1\2\7\4 comparing this 1\2\4 is substring of 1\2\7\4 so 1\2\7\4 will be updated with id of 1\2\4 in the table and 1\2\7 will be inserted as new one,
and finally output should look like:
Required Output
ID|TAG_VAL
1|1
2|1\2
*3|1\2\7\4*
4|1\2\6
5|1\3
6|1\3\5
*7|1\2\4*
Thanks for your help in advance,

MERGE INTO sk_recalc s
USING
(select rownum id,ltrim(sys_connect_by_path(empno,'\'),'\') tag_val from sk_main
start with mgr is null
connect by prior empno=mgr) t
ON (s.id = t.id)
WHEN MATCHED THEN
  update set tag_val = t.tag_val
WHEN NOT MATCHED THEN
  insert values ( t.id,t.tag_val);

Similar Messages

  • Top n analysis using hierarchial queries

    hi all,
    can we do top n analysis in hierarchial queries using level pseudo columns. if so please give an example.
    thanks and regards,
    sri ram.

    Hi,
    Analytic functions (such as RANK) often interfere with CONNECT BY queries. Do one of them in a sub-query, and the other in a super-query, as shown below.
    If you do the CONNECT BY first, use ROWNUM (which is assigned after ORDER SIBLINGS BY is applied) to preserve the order of the CONNECT BY query.
    WITH     connect_by_results     AS
         SELECT     LPAD ( ' '
                   , 3 * (LEVEL - 1)
                   ) || ename          AS iname
         ,     sal
         ,     ROWNUM               AS r_num
         FROM     scott.emp
         START WITH     mgr     IS NULL
         CONNECT BY     mgr     = PRIOR empno
         ORDER SIBLINGS BY     ename
    SELECT       iname
    ,       sal
    ,       RANK () OVER (ORDER BY sal DESC)     AS sal_rank
    FROM       connect_by_results
    ORDER BY  r_num
    ;Output:
    INAME                  SAL   SAL_RANK
    KING                  5000          1
       BLAKE              2850          5
          ALLEN           1600          7
          JAMES            950         13
          MARTIN          1250         10
          TURNER          1500          8
          WARD            1250         10
       CLARK              2450          6
          MILLER          1300          9
       JONES              2975          4
          FORD            3000          2
             SMITH         800         14
          SCOTT           3000          2
             ADAMS        1100         12 
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data. If you use only commonly available tables (such as those in the scott or hr schemas), then you don't have to post any sample data; just post the results.
    Explain how you get those results from that data.
    Always say what version of oracle you're using.

  • What is the role of PRIOR in hierarchial queries

    hi all,
    what is the role of prior operator in CONNECT BY Clause of the hierarchial queries, what is the effect when it is used on the right side or left side of the condition ? almost all the queries contains this clause, if it is omitted the child values are not coming. what is the reason. plz explain.
    please check the following outputs:
    SQL> select ename,sys_connect_by_path(ename,'\') hierarchy from emp start with ename='KING' connect by empno = mgr;
    ENAME HIERARCHY
    KING \KING
    Elapsed: 00:00:00.04
    SQL> select ename,sys_connect_by_path(ename,'\') hierarchy from emp start with ename='KING' connect by prior empno = mgr;
    ENAME HIERARCHY
    KING \KING
    JONES \KING\JONES
    SCOTT \KING\JONES\SCOTT
    ADAMS \KING\JONES\SCOTT\ADAMS
    FORD \KING\JONES\FORD
    SMITH \KING\JONES\FORD\SMITH
    BLAKE \KING\BLAKE
    ALLEN \KING\BLAKE\ALLEN
    WARD \KING\BLAKE\WARD
    MARTIN \KING\BLAKE\MARTIN
    TURNER \KING\BLAKE\TURNER
    JAMES \KING\BLAKE\JAMES
    CLARK \KING\CLARK
    MILLER \KING\CLARK\MILLER
    14 rows selected.
    Elapsed: 00:00:00.09
    SQL> select ename,sys_connect_by_path(ename,'\') hierarchy from emp start with ename='KING' connect by empno = prior mgr;
    ENAME HIERARCHY
    KING \KING
    Elapsed: 00:00:00.06
    SQL>
    thanks and regards,
    sri ram.

    Hi, Sri Ram,
    Sri Ram wrote:
    hi all,
    what is the role of prior operator in CONNECT BY Clause of the hierarchial queries, "PRIOR x" means a value of x from one of the rows that were added to the result set at the previous level.
    what is the effect when it is used on the right side or left side of the condition ? There is no difference between
    CONNECT BY  PRIOR  x  = yand
    CONNECT BY  y  = PRIOR  xjust like there is no difference between
    WHERE  x  = yand
    WHERE  y  = x
    almost all the queries contains this clause, No, most queries do not contain a CONNECT BY clause.
    Most queries that have a CONNECT BY clause do use a PRIOR operator.
    if it is omitted the child values are not coming. what is the reason. plz explain.No, that's not true. A common example is a Counter Table :
    SELECT  SYSDATE + LEVEL - 1
    FROM    dual
    CONNECT BY  LEVEL  <= 7;
    please check the following outputs:
    SQL> select ename,sys_connect_by_path(ename,'\') hierarchy from emp start with ename='KING' connect by empno = mgr;
    ENAME HIERARCHY
    KING \KING
    Elapsed: 00:00:00.04
    SQL> select ename,sys_connect_by_path(ename,'\') hierarchy from emp start with ename='KING' connect by prior empno = mgr;
    ENAME HIERARCHY
    KING \KING
    JONES \KING\JONES
    SCOTT \KING\JONES\SCOTT
    ADAMS \KING\JONES\SCOTT\ADAMS
    FORD \KING\JONES\FORD
    SMITH \KING\JONES\FORD\SMITH
    BLAKE \KING\BLAKE
    ALLEN \KING\BLAKE\ALLEN
    WARD \KING\BLAKE\WARD
    MARTIN \KING\BLAKE\MARTIN
    TURNER \KING\BLAKE\TURNER
    JAMES \KING\BLAKE\JAMES
    CLARK \KING\CLARK
    MILLER \KING\CLARK\MILLER
    14 rows selected.
    Elapsed: 00:00:00.09
    SQL> select ename,sys_connect_by_path(ename,'\') hierarchy from emp start with ename='KING' connect by empno = prior mgr;
    ENAME HIERARCHY
    KING \KINGOkay, I checked them. I get the same results. Did you have a question about them?

  • Doubt's regarding the Hierarchial Queries in Oracle

    Hi,
    i have a doubt regarding the Hierarchial Queries in Oracle.
    SELECT * FROM TMP_TEST;
    ID     NUMVAL     STRVAL
    1     100     Hello
    1     -100     World
    2     1     Concatenate
    2     2     In String
    2     3     using Connect By
    2     4     Using SYS_CONNECT_BY_PATH
    i am clear with my execution of IN_Line view (mechanism how it work's) .
    But i have also read about the Hierarchial queries in the Oracle product documentation's. i am also aware of the
    SYS_CONNECT_BY_PATH , LEVEL & START WITH , CONNECT BY Keywords.
    But i couldnot able to Manually work out as how this below Query works.
    Can you please explain me how this Hieracial query works ?
    SELECT ID, (SYS_CONNECT_BY_PATH(STRVAL,',')),LEVEL
    FROM
    SELECT ID,STRVAL,ROW_NUMBER() OVER(PARTITION BY ID ORDER BY ID) RNUM,
    COUNT(*) OVER(PARTITION BY ID ORDER BY ID) CNT,NUMVAL
    FROM TMP_TEST
    START WITH RNUM = 1
    CONNECT BY PRIOR RNUM = RNUM - 1
    Many Thanks,
    Rajesh.

    Hi, Rajesh,
    My first message was in response to your first message.
    In your latest message, the query is:
    SELECT  ID, (SYS_CONNECT_BY_PATH(STRVAL,',')),LEVEL
    FROM    (
            SELECT  ID,STRVAL,ROW_NUMBER() OVER(PARTITION BY ID ORDER BY ID) RNUM,
                    COUNT(*) OVER(PARTITION BY ID ORDER BY ID) CNT,NUMVAL
            FROM TMP_TEST
    WHERE   RNUM = CNT
    START WITH  RNUM = 1
    CONNECT BY  PRIOR RNUM = RNUM - 1;It looks like you lost the second CONNECT BY condition:
    AND PRIOR ID = IDPut it back: it's important.
    Now you're confused about the output row:
    2    ,Hello,World,using Connect By,Using SYS_CONNECT_BY_PATH   4It doesn't seem to correspond to anything results that you got when you ran the sub-query alone.
    That's because the resutls from your sub-query may change every time you run it, even though the data doesn't change. The ORDER BY clauses in both of the analytic functions do not result in a complete ordering. In fact, they're completely meaningless. It never makes any sense to PARTITON BY and ORDER BY the same value; "PARTITION BY id" means that only rows with the same id will be compared to each other; you might as well say "ORDER BY 0" or "ORDER BY dmbs_random.value".
    The ORDER BY clause of ROW_NUMBER whould reflect that way in which you want the results to appear within each id, for example:
    ROW_NUMBER () OVER (PARTITION BY id ORDER BY UPPER (strval))Note that this is very similar to what was in my first reply.
    In the COUNT function, why do you want an ORDER BY clause at all? Just say:
    COUNT (*) OVER (PARTITION BY id)

  • Actual cost in the workplan task screen (hierarchy) not show value.

    Hi all,
    Could you advice me about actual cost if I want to show in the workplan task screen (hierarchy).
    Thank you.

    Well, then just check the master data setting in Query designer--> choose 0Costcenter and check the properties > choose advanced tab> under filter value Selection during Query Execution . check for these options
    1.Only Posted Values for Navigation
    2.Only values in Infoprovider
    3.Values in Master data table
    4.Characterstic Relationship.
    You need to choose the 3rd opitions as you need to read the master tables for 0costcenter.
    Hope it helps,
    Cheers,
    Balaji

  • SCCM Hierarchy Queries

    Please answer the below queries on urgent manner
    Scenario 1. SCCM installed as a primary stand alone site, It is possible to install/configure another primary site in same site code.
    I understand existing stand alone should connected to CAS server first, Under the CAS server can i install another Primary site in remote locations - ??
    Scenarion 2. Assume i installed CAS server first, created the primary(1st) in Headoffice and plannned to install another primary (2nd) site in remote location. Any replication will happen be between CAS server and primary site (2nd) installed in
    remote locations. If Yes, can it scheduled at off time or it can enabled with Branch cache. -??

    If I continue with my stand alone primary site, is it possible to extend another primary site under existing primary site server
    without introducing CAS server ??<o:p></o:p>
    Rajesh – No, it is not possible,<o:p></o:p>
    If its allowed to introduce another primary site under existing stand alone primary site, Whether the new primary
    site can handle clients independently (No client should contact parent primary site) ??<o:p></o:p>
    Rajesh :: This scenario is not possible. <o:p></o:p>
    If i planned to introduce secondary site under existing stand alone primary site, Separate CAS server still
    required ??.<o:p></o:p>
    Rajesh :: No it is not required. You can install a secondary Site under the primary site without the CAS.<o:p></o:p>
    If i add an secondary site under exisitng primary site server, i assumed secondary site server data's (client
    info) will always replicate to primary site - this will choke my network traffic -??<o:p></o:p>
    Rajesh :: Secondary Site will always replicate the data to Primary Site. Bandwidth utilization depends on the number of clients
    on the secondary site. If you have less than 2000 clients and have a good network link, you can still survive with a DP only.<o:p></o:p>
    Assume, I installed CAS server, Under CAS server two primary server (1 - HO site, 1 - Branch site) added.
    In that case i need clarity, whether branch primary site will replicate continously with CAS  server for data replication ??<o:p></o:p>
    Rajesh :: Yes, There will be a continuous data replication between CAS and Primary site. In addition to that content and un
    processed DDRs will flow using file base replication. However you can configure bandwidth throttling using replication routes to control file base replication. Please visit following link to understand data replication in SCCM 2012.
    http://blogs.technet.com/b/server-cloud/archive/2012/03/06/data-replication-in-system-center-2012-configuration-manager.aspx

  • Hierarchial Queries and Redo log files

    Hi,
    I'm running a hierarchial query (start with, connect by prior, etc.).
    The query takes a couple of minutes and apparently is filling up the archive files
    (I assume it comes from the redo log files).
    Question:
    1. Does it make sense that a hierarchial query should so fill up the redo log files (It seems as if all the 'intermediate' results are being written there).
    2. What do you suggest I do ??
    Thanks,
    David

    What do you suggest I do ??Post your query and the execution plan or the trace file from tkprof.
    How to do that is explained in this thread;
    How to post a SQL statement tuning request HOW TO: Post a SQL statement tuning request - template posting

  • Hierarchial Queries

    Consider the follwoing data set:
    Parent Child_Low Child_High
    10 200 300
    250 400 600
    500 700 800
    I want the following result set:
    10 250 500.
    I used the folowing query:
    'select rownum, level, parent, child_low, child_high
    from 'TABLE_NAME'
    connect by
    and prior child_low <= parent
    and prior child >= parent'.
    It certainly does not work.
    Can somebody give me some kind a solution??????

    check out the following query...
    Select level,Parent ,Child_Low ,Child_high
    from 'table_name'
    start with Parent =10
    connect by Parent between prior Child_low and prior child_high

  • Error from loading Hierarchy data from BW

    I am following the BPC NW online help to load the costcenter master data from BW, The members were successfully loaded, but
    when I tried to load the hierarchy, I received the following message"
    Task name HIERARCHY DATA SOURCE:
    Info: Hierarchy node includes text node or external characteristics
    Record count: 50
    Task name CONVERT:
    No 1 Round:
    Record count: 50
    Accept count: 50
    Reject count: 0
    Skip count: 0
    Task name HIERARCHY DATA TARGET:
    Hierarchy nodes include dimension members that do not exist
    Submit count: 0
    Application: CONSOLIDATION Package status: ERROR
    I am pretty sure that all the dimension members were loaded in this herarchy. Since the hierarchy node I am trying to load only include 2 level, I have only 49 base member and 1 node which I can see from the BPC admin after master data,following is the.tranformation and conversion file:
    *OPTIONS
    FORMAT = DELIMITED
    HEADER = YES
    DELIMITER = ,
    AMOUNTDECIMALPOINT = .
    SKIP = 0
    SKIPIF =
    VALIDATERECORDS=YES
    CREDITPOSITIVE=YES
    MAXREJECTCOUNT=
    ROUNDAMOUNT=
    *MAPPING
    NODENAME=NODENAME
    HIER_NAME=HIER_NAME
    PARENT=PARENT
    ORDER=ORDER
    IOBJNM=IOBJNM
    VERSION=VERSION
    *CONVERSION
    HIER_NAME=HIER_NAME.xls
    NODENAME=HIER_NAME.xls!NODE_NAME
    PARENT=HIER_NAME.xls!NODE_NAME
    CONVERION TAB:
    EXTERNAL     INTERNAL     FORMULA     
    CC_Her     PARENTH1             where CC_Her is the name of the gerarchy in BI
    NODENAME TAB:
    EXTERNAL     INTERNAL     FORMULA
    *     js:%external%.toString().replace(/\s+/g,"")     
    Did I miss anything?
    Edited by: Jianbai on Jan 18, 2011 9:57 PM
    Edited by: Jianbai on Jan 19, 2011 12:29 AM

    Hi Jianbai,
    The following link describes the steps to import master data/hierarchies from SAP BW into SAP BPC 7.5 NW..
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c02d0b47-3e54-2d10-0eb7-d722b633b72e?quicklink=index&overridelayout=true
    Hope this helps!
    Thanks
    BSV

  • Importing Master Data Hierarchy from BW Infobject

    I am importing from top level node(text hierarchy) of BW infobject Account. All the records are rejected with the following error. It says that Hierarchy nodes include dimension members that do not exist. The reason for this is that it is top level text hierarchy defined by users. I can import the base level one by one. Any sugestion please. How to docs are not very helpful.
    /CPMB/MODIFY completed in 0 seconds
    /CPMB/BW_IOBJ_HIER_SOURCE completed in 0 seconds
    /CPMB/IOBJ_SOURCE_HD_CONVERT completed in 3 seconds
    /CPMB/BPC_HIER_DATA_TARGET completed in 5 seconds
    /CPMB/CLEAR completed in 0 seconds
    [Selection]
    INFOOBJECT=0CS_ITEM
    SELECTION=<Selections><Selection Type="Hierarchy" ImportText="1"><Hierarchy><ID>D8IGJYZMI5W3TJ2UBMZGCL6QF</ID><MemberID>TB</MemberID><Level></Level></Hierarchy></Selection><KeyDate>20100820</KeyDate></Selections>
    FORMAT= No
    TRANSFORMATION= DATAMANAGER\TRANSFORMATIONFILES\PILOT\forHier_Account.xls
    DIMNAME=P_ACCT
    [Messages]
    Task name HIERARCHY DATA SOURCE:
    Info: Hierarchy node includes text node or external characteristics
    Record count: 2724
    Task name CONVERT:
    No 1 Round:
    Record count: 2724
    Accept count: 2724
    Reject count: 0
    Skip count: 0
    Task name HIERARCHY DATA TARGET:
    Hierarchy nodes include dimension members that do not exist
    Submit count: 0
    Application: PLANNING Package status: ERROR

    Thanks Jeffery Holdeman for that. Tranformation & Coversion files for Mater Data & Hierarchy are listed below.
    In my DM package the Hierarchy Tab is Hierarchy = TCTB, EMPTY, Member ID = TB(top most level of taxt hierarchy)
    Master Data:
    *OPTIONS
    FORMAT = DELIMITED
    HEADER = YES
    DELIMITER = TAB
    AMOUNTDECIMALPOINT = .
    SKIP = 0
    SKIPIF =
    VALIDATERECORDS=YES
    CREDITPOSITIVE=YES
    MAXREJECTCOUNT=
    ROUNDAMOUNT=
    *MAPPING
    ID=0CS_CHART+ID
    *CONVERSION
    ID=[COMPANY]id_conversion_01.XLS!CONVERSION
    id_conversion.xls is as below:
    (-     js:%external%.replace("-", "_")
    Transformation & Conversion file for Hierarchy:
    *OPTIONS
    FORMAT = DELIMITED
    HEADER = YES
    DELIMITER = TAB
    AMOUNTDECIMALPOINT = .
    SKIP = 0
    SKIPIF =
    VALIDATERECORDS=YES
    CREDITPOSITIVE=YES
    MAXREJECTCOUNT=
    ROUNDAMOUNT=
    *MAPPING
    NODENAME=NODENAME
    HIER_NAME=HIER_NAME
    PARENT=PARENT
    ORDER=ORDER
    IOBJNM=IOBJNM
    VERSION=VERSION
    *CONVERSION
    HIER_NAME=[COMPANY]hier_conversion_for_account.xls!CONVERSION
    NODENAME=[COMPANY]hier_conversion_for_account.xls!NODENAME
    PARENT=[COMPANY]hier_conversion_for_account.xls!NODENAME
    hier_conversion_for_account.xls is as below:-
    Nodesname(worksheet)
    External        Internal
    -     js:%external%.toString().replace("-","_")     
    *     js:%external%.toString().replace(/\s+/g,"")     
    Conversion(worksheet)
    EXTERNAL     INTERNAL     FORMULA     
    TCTB     PARENTH1

  • VSO agile template adding link task as child makes parent missing from backlog

    HI,
    I have a tasks in my backlog for iteration, if I add a new child task for this as a linked workItem, the parent task doesn't show up in backlog/task board. If I go to stories view, and show hierarchy I can see both the parent task and child task as hierarchy.
    a) How I can see task hierarchy in backlog view
    b)why parent tasks gets invisible from backlog view, when a child link item is added
    Thanks
    singhhome

    Hi singhome,
    Nested tasks will make the parent task disappear, you will just see the PBI and the lowest level child task show in Backlog and Task board. It is not support nested tasks for board view, board does not show the intermediary nested tasks.
    It's the same with on-premise TFS, and you can refer to the link below for more information:
    http://nakedalm.com/tfs-2012-agile-planning-tools-issue-nested-tasks-makes-the-parent-task-disappear/
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Where-used list for queries restricted by characteristic value

    Hi SDN Community
    I came across this useful documentation on how to track down a query which is restricted to a certain hierarchy
    Queries that use a hierarchy
    Is it possible to track down queries from a given characteristic value.
    eg. ID = 355 from InfoObject ZIDMEASP, represents Production Measure ID.
    Thank you.
    Simon

    Hi  SDN community,
    So far i have had this response from SAP OSS Message but require this as a consulting issue.
    Is it such that anyone is aware of the way to tract down queries from restricted value,
    Thank you.
    25.10.2007 - 10:54:51 CET    SAP    Reply 
    Dear Simon,
    You can track down the query from a characteristic as per the following
    steps, eg.
    - Tr_cd: RSD1
    - eg. input ZIDMEASP to Infoobject
    - click on "Where-used list using AWB"
    - find out which InfoCube, InfoSet, ODS Object etc. are using
    infoobject ZIDMEASP
    - open bex analyzer, in the "Select query" screen, search with the
    InfoCube/InfoSet/ODS Object one by one under "InfoAreas", then you
    can see which query is using them

  • Hierarchy Query - Removing Child Nodes

    Hopefully an easy one for someone practiced with hierarchy queries.
    If I have a hierarchy:
    A
      B
        CThe where clause restricts the result so that B is removed, I now have:
    A
        CI would like to make it so that if you cut off a node, the entire branch beneath it is cut. In this example, only A should be returned.
    My experience with hierarchy queries is limited, and I've searched high-and-low for an example or discussion to make this happen using a standard method. I'm sure I can make it happen, but if there is an established/standard (aka efficient) way of making this happen I'd prefer to do that. Everything I have found references making C show up...that's obviously not what I'm having a problem doing.
    Here's an example:
    CREATE TABLE Z_HIERARCHY (
       test_id NUMBER,
       label VARCHAR2(50),
       parent_id NUMBER);
    INSERT INTO Z_HIERARCHY VALUES (1, 'A', 0);
    INSERT INTO Z_HIERARCHY VALUES (2, 'B', 1);
    INSERT INTO Z_HIERARCHY VALUES (3, 'C', 2);
    COMMIT;
    SELECT label, level
    FROM z_hierarchy
    START WITH parent_id = 0
    CONNECT BY PRIOR test_id = parent_id;
    Result:
    A
      B
        C
    SELECT label, level
    FROM z_hierarchy
    WHERE test_id <> 2
    START WITH parent_id = 0
    CONNECT BY PRIOR test_id = parent_id;
    Result:
    A
        CWhat I want is simply A. C is dependent on a parent that isn't in the result set...don't want it shown either.
    Thanks in advance!
    Ron

    Hi, Ron,
    So you want to pretend, just for this query, that the row with test_id=2 doesn't exist? Then do what Tubby suggested: run the query, not on the full z_hierarchy table, but on a copy of the table where that row doesn't exist.
    You could also do something like this:
    SELECT     label
    ,     LEVEL
    FROM      z_hierarchy
    START WITH     parent_id     = 0
    CONNECT BY     parent_id     = PRIOR test_id
         AND     test_id          != 2
    ;but, depending on your requirements, you might need to put a similar condition in the START WITH clause. In general, Tubby's solution is best.
    rmhardma wrote:
    ... No other built-in way to do this without doing the inline view, eh?Sure: you can always replace an in-line view with a WITH clause:
    WITH     good_rows_only     AS
       select *
       FROM z_hierarchy
       WHERE test_id  != 2
    SELECT label, level
    from   good_rows_only
    START WITH parent_id = 0
    CONNECT BY PRIOR test_id = parent_id;Pehaps you meant "without a sub-query".

  • BPC Hierarchy load - Zero record

    Hi Experts
    I am trying to load Master data + Hierarchy first time in this system and followed below both document..
    http://scn.sap.com/docs/DOC-35363
    http://scn.sap.com/docs/DOC-35364
    The master data/attribute load run successfully with selecting "OR" option and hierarchy..but BPC is not able to recognize the Hierarchy nodes..
    When I run only Hierarchy package then I get below log ->
    Task name HIERARCHY DATA SOURCE:
    No records are returned from 0GL_ACCOUNT
    Record count:                                                 0
    Task name CONVERT:
    No 1 Round:
    Reject count: 0
    Record count: 0
    Skip count: 0
    Accept count: 0
    Task name HIERARCHY DATA TARGET:
    Submit count: 0
    I am sure the issue is that BPC is not able to read Hierarchy from BW & i have checked the hierarchy structure is present in BW.
    I am working on BW 7.4 , BPC 10   Release -> 801   SP-Level 06  , EPM 17 Patch 2
    Thanks for your help!!

    Hi Andy
    I can not see the Hierarchy nodes in Web Admin after loading Master data.
    I have exact setup in other implementation in BW 7.3 and it is working but in BW 7.4 it is not
    Applied 2 relevant SAP note but still issue is there..
    1957783
    1968630

  • [Outlook] tasks and... sub tasks.

    Inside Outlook, I would like to have sub-tasks features.
    Often I need to nest some sub-tasks into a main task.
    There's some workaround ...or extra plug in to do it?
    bye
    Daniele.b75

    Hi,
    Outlook does not have the capability for subtasks without add-ins. Numbering is the usual recommendation.
    For example:
    Task
    1.1  
    Subtask A
    1.2  
    Subtask B
    Furthermore, the add-ins called Taskline might get the function of organizing tasks in hierarchy. You may refer to the link:
    http://www.taskline.com/
    Please Note: The third-party product discussed here is manufactured by a company that is independent of Microsoft. We make no warranty, implied or otherwise, regarding this product's performance or reliability.
    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

Maybe you are looking for