Parent-Child using messageChoice to table

I have a UIX form that has two components on it. A <messageChoice> that is displaying parent data (e.g. departments) and a <table> that is displaying the employees in the department.
I would like to be able to select a department from the <messageChoice> and have the employees displayed in the <table>.
The model includes a viewlink between the parent table and the child table to force the relationship.
When I create the <messageChoice> as a LOV I get a message in the "List Binding Editor" that says:
"You have selected a detail data collection as the target (data collection) and master data collection as the source (data collection).
Target data collection will not be modified but navigated based on the selection in the LOV.
Want to proceed?"
(This looks ok to me.)
I build the rest of the page and have tried to add an event action to the <messageChoice> but I have not been able to get the parent VO to be set to the selected record so that the child will display the associated data. The first record that is showing has the correct child records.
The UIX looks like this:
<messageChoice id="mcSID" model="${bindings.Dept}">
<contents childData="${bindings.Dept.displayData}">
<option model="${uix.current}"/>
</contents>
<primaryClientAction>
<fireAction event="selectDID" formSubmitted="false">
<parameters>
<parameter key="currentDID" value="${bindings.Did}"/>
</parameters>
</fireAction>
</primaryClientAction>
</messageChoice>
<spacer width="10" height="10"/>
<styledText text="CURRENT DID: "/>
<styledText text="${param.currentDID}"/>
I believe that I need to be able to trap the id of the record that has been selected so that the parent VO can be set to this value. The child VO should follow suit. However, I am not able to get the value from the messageChoice. How can I get this to work?

Hi Vince -
I spent some time yesterday trying to put together a solution based on the Employees/Departments tables of the HR sample schema. Like you, I started by trying to bind the mesageChoice such that the Departments view object is used for the source data collection and the Employees view object on the other side of the view link is the target data collection. When creating the binding, I too saw the "Target data collection will not be modified but navigated based on the selection in the LOV" message, which seemed like a good sign. Although the messageChoice does get populated correctly, no records are found when I try to select a new department.
I recruited a co-worker who has more experience working with ADF BC to help out, and he proposed a slightly different solution, which we were able to get up and running. I'm not sure whether this is necessarily the best solution, and there most certainly are other ways to accomplish the same functionality, but the solution seems to work fairly well, so I thought it would be worth sharing.
The main change in new solution has to do with the target data collection that is used when setting up the list binding. In the earlier solutions that both you and I attempted, the target data collection is the "detail" view object itself (ie. the Employees view object hanging off of the Departments view object via a view link). Instead of going this route, my colleague suggested using an intermediate "transient" view object to hold the result of the list selection. This view object is linked to a new instance of the Employees view object. The idea is that when the list selection changes, it is applied to the new transient view object, which in turn restricts the employees that are included in the linked Employees view object.
Here are steps we followed to get this up and running:
1. Create the basic data model
We used the HR schema, and created view objects from the EMPLOYEES and DEPARTMENTS tables. This produced an application module with the following view objects:
- EmployeesView1: All employees
- DepartmentsView1: All departments
- EmployeesView3: View of employees linked to DepartmentsView1
2. Define a transient view object for holding selection data
Using the "Create View Object" wizard, we set up the view object as follows:
Step 1: Set name to "TransientDepartmentsView"
Step 2: Do not select any entities (since the view object is transient)
Step 3: Create a new attribute named "DepartmentId". Set the type to "Number". Set updateable to "Always". Check "Selected In Query". Set Alias to "DEPARTMENT_ID".
Step 4: Leave attribute settings as is
Step 5: Set query to "SELECT 10 AS DEPARTMENT_ID FROM DUAL".
Accept all other defaults in remaining steps and finish.
The new view object has a single attribute "DepartmentId", which will be used to store the results of the list binding. The "SELECT 10 AS DEPARTMENT_ID FROM DUAL" serves two purposes. The "FROM DUAL" clause ensures that the view object only ever contains a single row. The "SELECT 10 AS DEPARTMENT_ID" ensures that a default department id (10) is provided, so that the initial page render will display the employees from the default department.
3. Define a view link between the TransientDepartmentsView and EmployeesView
In the "Create View Link" wizard, enter the following values:
Step 1: Set name to "TransientEmpDeptFKLink".
Step 2: Select the TransientDepartmentsView's DepartmentId attribute for the source. Select the EmployeesView's DepartmentId for the destination. Click Add.
Accept all other defaults in remaining steps and finish.
5. Add new view object instances to the application module.
In steps 3 and 4, we enhanced our model definition to include a new view object and view link. Now, we need to create instances of these objects in the application module, as follows:
- Double click on the AppModule node in the Applications Navigator to bring up the Application Module editor.
- Select the "Data Model" node to display the available model objects.
- Select the TransientDepartmentsView node in the "Available View Objects" pane.
- Click the right arrow button to add a new instance to the application module. You should see a new view object instance named "TransientDepartmentsView1" appear in the Data Model pane, which should be selected.
- Back in the Available View Objects pane, select the "EmployeesView via TransientEmpDeptFKLink" node. Leaving the "TransientDepartmentsView1" node selected on the Data Model pane, click the right arrow. You should now see an "EmployeesView4 via TransientEmpDeptFKLink1" node appear under the "TransientDepartmentsView1" node in the Data Model pane.
- Click OK
At this point we're done preparing the data model. Before we move on, we can test the model in the Oracle Business Component Browser. Bring up the BC Browser by right-clicking on the "model" node in the Application Navigator and selecting "Run". You should see our new transient view object and link under the application module. If you double-click the TransientEmpDeptFKLink1, you should see a "DepartmentId" field linked to the employees view. Try entering a new department id (eg. "90") into the field and hit enter. The emloyees list should be filtered accordingly.
6. Set up the page flow.
In my sample, I just add a single Data Page ("/dataPage1") to the struts-config.xml. To create the corresponding UIX page, double click the Data Page node and select "/dataPage1.uix".
7. Create the messageChoice and set up list binding.
In the Data Control pallete, select the DepartmentId attribute of the TransientDepartmentsView1 view object. Set "Drag and Drop As:" to "MessageChoice", and drag the DepartmentId node to the UIX page. This brings up the List Binding Editor.
In the List Binding Editor, change the List Binding Mode to "LOV Mode". The target data collection should already be populated. Select DepartmentsView1 for the source data collection, since we want to display all available departments in our messageChoice. Click New/OK to create a new source iterator. Click Add and verify that both the source and target attribute is "DepartmentId".
In the LOV Display Attributes pane, select DepartmentId and/or DepartmentName as desired.
8. Set up the client action.
From the property inspector, launch the primaryClientAction editor. Select "Fire action by submitting Form" and click OK. This will set up a <primaryClientAction> element in your uiXML code. By default, the fireAction client action assumes a default event named "update". We don't want to fire a UIX event - we just want to submit the form and allow ADF to handle the postback. So, to suppress the default "update" event, go into your uiXML and add 'event=""' to the <fireAction> element. Your <fireAction> element should look like this:
<fireAction event="" formSubmitted="true"/>
9. Set up the employees table.
Back in the data control palette, select the "EmployeesView4" node, which should be under the "TransientDepartmentsView1" node. Make sure "Drag And Drop As: " is set to "Read-Only Table", and Drag the EmployeesView4 node onto the UIX page. You should see the table appear with appropriate bindings.
At this point, you should be good to go. Try running the /dataPage1 Data Page from the struts-config.xml editor. When the page first comes up, you should see the default department selected (in our sample, that would be 10/Administration) and the table should display the corresponding employees. When a new department is selected, the <fireAction> triggers a form submission. This in turn causes the selected value to be applied to the transient departments view object, and the linked employees view object to be filtered accordingly. When the page is re-rendered, the employees table should be updated to reflect the currently selected department.
Hope this helps solve your problem. As I mentioned above, I'm sure there are other ways to do this. If anyone has recommendations for a simpler solution, please let us know!
Andy

Similar Messages

  • Parent Child Relationship in the table to be queried.

    Hi guys,
    I have the below query.
    Table 1:
    Column_name Reference
    Value1 Value1
    Value2 Value1
    Table 2:
    Column_name Attributes(child Elements)
    Value1 Child1
    Value1 Child2
    Now my query is to retrieve records as below using both the tables.
    Value1
    Value1.Child1
    Value1.Child2
    Value2
    Value2.Child1
    Value2.Child2
    How can I get such ?
    Regards,
    SQL Developer.

    Hi,
    As Alex said, you should have tried by joining them.
    With Parent As (
    select 'Value1' p_col1,'Value1' P_col2 from dual union all
    select 'Value2','Value1' from dual),
    child as (
    select 'Value1' c_col1,'Child1' c_col2 from dual union all
    select 'Value1','Child2' from dual)
    -- End of sample data
    select p_col1,null c_col2 from parent
    union
    select p_col1,c_col2 from parent,child
    where p_col2=c_col1
    order by p_col1,c_col2 desc
    PRAZY@11gR1> /
    P_COL1 C_COL2
    Value1
    Value1 Child2
    Value1 Child1
    Value2
    Value2 Child2
    Value2 Child1
    6 rows selected.
    Elapsed: 00:00:00.03Regards,
    Prazy

  • Parent/child records from same table

    I want to create a query that is a union such that the 2nd resultset is based on the 1st resultset. I have a table that has parent/child records in the same table.
    Table: EVENTS
    EVENT_ID
    PARENT_EVENT_ID
    CREATED_DATE
    (other columns)
    if PARENT_EVENT_ID is null then it is a parent record, else it is a child record. I want to select all parent records then union them with all the associated child records...something like this:
    select * from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null -- All parents
    union
    select * from EVENTS where PARENT_EVENT_ID in (select EVENT_ID from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null) -- include any children of parents selected from above
    This works but it's kind of ugly, I want to avoid using the sub-select in the 2nd because it is a repeat of the 1st statement, is there a way to alias the first statement and just refer to it in the 2nd query?

    Hi,
    kev374 wrote:
    Thanks, one question...
    I did a test and it seems the child rows have to also satisfy the parent row's where clause, take this example:
    EVENT_ID|PARENT_EVENT_ID|CREATED_DATE
    2438 | (null) | April 9 2013
    2439 | 2438 | April 11 2013
    2440 | 2438 | April 11 2013
    select * from EVENTS where CREATED_DATE < sysdate - 9
    start with EVENT_ID = 2438
    connect by PARENT_EVENT_ID = prior EVENT_IDSo you've changed the condition about only wanting roots and their children, and now you want descendants at all levels.
    This pulls in record #2438 (per the sysdate - 9 condition) but 2439 and 2440 are not connected. Is there a way to supress the where clause evaluation for the child records? I just want to pull ALL child records associated with the parent and only want to do the date check on the parent.Since the roots (the only rows you want to exclude) have LEVEL=1, you can get the results you requested like this:
    WHERE   created_date  < SYSDATE - 9
    OR      LEVEL         > 1However, since you're not ruling out the grandchildren and great-grandchildren any more, why wouldn't you just say:
    SELECT  *
    FROM    events
    WHERE   created_date     < SYSDATE - 9
    OR      parent_event_id  IS NOT NULL;?
    CONNECT BY is slow. Don't use it if you don't need it.
    If you x-reference my original query:
    select * from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null -- All parents
    union
    select * from EVENTS where PARENT_EVENT_ID in (select EVENT_ID from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null) -- include any children of parents selected from above
    The 2nd select does not apply the created_date < sysdate - 90 on the children but rather pulls in all related children :)Sorry; my mistake. That's what happens when you don't post sample data, and desired results; people can't test their solutions and find mistakes like that.

  • TIPS(9):PARENT-CHILD(FOREIGN KEY) 관계를 갖는 MASTER TABLE의 PRIMARY KEY 확인.

    제품 : SQL*PLUS
    작성날짜 : 1996-10-21
    TIPS(9) : PARENT-CHILD관계를 갖는 TABLE의
    PRIMARY key, FOREIGN key의 COLUMN 명과 POSITION 확인
    ==============================================================
    ** Name : Show_Position.Sql
    ** Usage : @Show_Positions Parent_Table Child_Table
    ** Description : Shows Primary And Foreign Key Positions
    ** WARNING : 이 문장은 해당 Table의 Constraint생성시 Naming
    ** Convention을 따른 경우에 적용되도록 되어 있다.
    SET VERIFY OFF
    CLEAR BREAK
    BREAK ON CONSTRAINT_NAME ON TABLES
    SELECT SUBSTR(CONSTRAINT_NAME,1,27) CONSTRAINT_NAME,
    SUBSTR(TABLE_NAME,1,15) TABLES,
    SUBSTR(COLUMN_NAME,1,15) COL_NAME,
    SUBSTR(POSITION,1,3) POSITION,
    SUBSTR(OWNER,1,7) OWNER
    FROM USER_CONS_COLUMNS
    WHERE TABLE_NAME = UPPER('&1')
    AND CONSTRAINT_NAME LIKE 'PK%'
    UNION
    SELECT SUBSTR(CONSTRAINT_NAME,1,27) CONSTRAINT_NAME,
    SUBSTR(TABLE_NAME,1,15) TABLES,
    SUBSTR(COLUMN_NAME,1,25) COL_NAME,
    SUBSTR(POSITION,1,3) POSITION,
    SUBSTR(OWNER,1,7) OWNER
    FROM USER_CONS_COLUMNS
    WHERE TABLE_NAME = UPPER('&2')
    AND CONSTRAINT_NAME LIKE 'FK%'
    ORDER BY 1 DESC , 4 ASC;
    < 실행 예 >
    SQL> @SHOW_POSITIONS EMP_SERVICE EMP_SERVICE_LOG
    CONSTRAINT_NAME TABLES COL_NAME POS
    PK_EMP_SERVICE EMP_SERVICE EMP_ID 1
    CUST_ID 2
    FK_EMP_SERVICE_LOG_EC EMP_SERVICE_LOG EMP_ID 1
    CUST_ID 2

    제품 : SQL*PLUS
    작성날짜 : 1996-10-21
    TIPS(9) : PARENT-CHILD관계를 갖는 TABLE의
    PRIMARY key, FOREIGN key의 COLUMN 명과 POSITION 확인
    ==============================================================
    ** Name : Show_Position.Sql
    ** Usage : @Show_Positions Parent_Table Child_Table
    ** Description : Shows Primary And Foreign Key Positions
    ** WARNING : 이 문장은 해당 Table의 Constraint생성시 Naming
    ** Convention을 따른 경우에 적용되도록 되어 있다.
    SET VERIFY OFF
    CLEAR BREAK
    BREAK ON CONSTRAINT_NAME ON TABLES
    SELECT SUBSTR(CONSTRAINT_NAME,1,27) CONSTRAINT_NAME,
    SUBSTR(TABLE_NAME,1,15) TABLES,
    SUBSTR(COLUMN_NAME,1,15) COL_NAME,
    SUBSTR(POSITION,1,3) POSITION,
    SUBSTR(OWNER,1,7) OWNER
    FROM USER_CONS_COLUMNS
    WHERE TABLE_NAME = UPPER('&1')
    AND CONSTRAINT_NAME LIKE 'PK%'
    UNION
    SELECT SUBSTR(CONSTRAINT_NAME,1,27) CONSTRAINT_NAME,
    SUBSTR(TABLE_NAME,1,15) TABLES,
    SUBSTR(COLUMN_NAME,1,25) COL_NAME,
    SUBSTR(POSITION,1,3) POSITION,
    SUBSTR(OWNER,1,7) OWNER
    FROM USER_CONS_COLUMNS
    WHERE TABLE_NAME = UPPER('&2')
    AND CONSTRAINT_NAME LIKE 'FK%'
    ORDER BY 1 DESC , 4 ASC;
    < 실행 예 >
    SQL> @SHOW_POSITIONS EMP_SERVICE EMP_SERVICE_LOG
    CONSTRAINT_NAME TABLES COL_NAME POS
    PK_EMP_SERVICE EMP_SERVICE EMP_ID 1
    CUST_ID 2
    FK_EMP_SERVICE_LOG_EC EMP_SERVICE_LOG EMP_ID 1
    CUST_ID 2

  • Parent - child relationship in a table

    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    I have the following table. The table contains a attribute called parentraid which specifies whether its a parent or a child. For the data given below, ra1,ra2,ra3 are parent and remaining are child with their respective parents specified in parentraid attribute.
    CREATE TABLE  "ADDRESEARCHAREA"
       (     "RAID" VARCHAR2(30) NOT NULL ENABLE,
         "RANAME" VARCHAR2(30),
         "RASTARTDATE" DATE,
         "RAENDDATE" DATE,
         "PARENTRAID" VARCHAR2(30),
         "RASTATUS" VARCHAR2(30),
          PRIMARY KEY ("RAID") ENABLE
    insert into addresearcharea values ('ra1','raname1',to_date('04/01/2012','mm/dd/yyyy'),'','','Active')
    insert into addresearcharea values ('ra2','raname2',to_date('04/01/2012','mm/dd/yyyy'),'','','Active')
    insert into addresearcharea values ('ra3','raname3',to_date('04/01/2012','mm/dd/yyyy'),'','','Active')
    insert into addresearcharea values ('ra4','raname4',to_date('04/01/2012','mm/dd/yyyy'),'','ra1','Active')
    insert into addresearcharea values ('ra5','raname5',to_date('04/01/2012','mm/dd/yyyy'),'','ra2','Active')I am looking for the following output,
    RAID RANAME PARENTRAID PARENTRANAME
    ra1 raname1 -  - 
    ra2 raname2 -  - 
    ra3 raname3 -  - 
    ra4 raname4 ra1 raname1 
    ra5 raname5 ra2 raname2  Please help

    Hi,
    Try this
    SQL> CREATE TABLE  "ADDRESEARCHAREA"
      2     (       "RAID" VARCHAR2(30) NOT NULL ENABLE,
      3     "RANAME" VARCHAR2(30),
      4     "RASTARTDATE" DATE,
      5     "RAENDDATE" DATE,
      6     "PARENTRAID" VARCHAR2(30),
      7     "RASTATUS" VARCHAR2(30),
      8      PRIMARY KEY ("RAID") ENABLE
      9     );
    Table created.
    SQL>
    SQL> insert into addresearcharea values ('ra1','raname1',to_date('04/01/2012','mm/dd/yyyy'),'','','Active');
    1 row created.
    SQL> insert into addresearcharea values ('ra2','raname2',to_date('04/01/2012','mm/dd/yyyy'),'','','Active');
    1 row created.
    SQL> insert into addresearcharea values ('ra3','raname3',to_date('04/01/2012','mm/dd/yyyy'),'','','Active');
    1 row created.
    SQL> insert into addresearcharea values ('ra4','raname4',to_date('04/01/2012','mm/dd/yyyy'),'','ra1','Active');
    1 row created.
    SQL> insert into addresearcharea values ('ra5','raname5',to_date('04/01/2012','mm/dd/yyyy'),'','ra2','Active');
    1 row created.
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> select DISTINCT A.raid RAID,A.raname RANAME,A.parentraid PARENTRAID,
      2  case when A.parentraid=B.raid then A.raname else null end PARENT_NAME
      3  from ADDRESEARCHAREA A LEFT JOIN ADDRESEARCHAREA B ON (A.parentraid=B.raid) ORDER BY RAID ASC ;
    RAID RANAME  PARE PARENT_NAME
    ra1  raname1
    ra2  raname2
    ra3  raname3
    ra4  raname4 ra1  raname4
    ra5  raname5 ra2  raname5
    SQL>
    SQL>Edited by: Chanchal Wankhade on Oct 8, 2012 11:41 PM
    Edited by: Chanchal Wankhade on Oct 8, 2012 11:41 PM

  • Implementing Search Using MessageChoice - Help

    Hello all,
    I'm trying to implement a search operation for a Master-Detail Page.
    For which I've 2 MessageChoice's and a MessageTextInput.
    1) The first MessageChoice (Parent) represents the Table or View.
    2) The second MessageChoice (Child) represent the field or Attribute name of a particular table or view.
    3) The MessageTextInput would be for the user to enter the value for the search.
    Consider that my Master Detail is based on the Departments-Employees Scenario.
    Now for the MessageChoices I've created a Parent-child relationship based on this Post.
    Re: Parent-Child using <messageChoice> to <table>
    POSTS -> 464
    My Problem is that after following the steps mentioned in this link I don't have a "NAME" property in the Property Inspector for the messageChoice. It is only based on this "NAME" property that I can perform the search operation by writing an appropriate method in the application module Class. For an ordinary MessageChoice there is a property called "NAME" but in this case when i drag an drop an attribute as a messageChoice it's not there. If I try to manually include it... the whole parent-child relationship fails to work.
    I would like to know whether there is any other way of identifying the MessageChoice's or is there any other way of implementing the search. Thanks in advance.
    Regards,
    Arun.V

    [EasyFind|http://www.devon-technologies.com/products/freeware/index.html] can do this, though it's a lot slower than Spotlight.
    You can probably do it in Spotlight as well, but I think you need a "Raw Query" search, which is pretty clumsy. I believe that the Spotlight/Finder "friendly" interface implicitly uses all three of these search modifier options listed in Apple's [Spotlight Query Programming Guide|http://developer.apple.com/library/mac/#documentation/Carbon/Conceptual/S potlightQuery/Concepts/QueryFormat.html]:
    !http://i51.tinypic.com/2vngp37.jpg!
    The standard search options don't provide for changing this, but a Raw Query search which uses just dw as the modifiers instead of cdw should be case-sensitive. To set this up you could start with a Finder window, type command-F, set the search scope at the top to "Contents, set Kind to "Other" and choose Raw Query, then enter the following in the text entry box:
    kMDItemTextContent == "THIS TEXT AS IT APPEARS HERE"dw
    I've tried this in Snow Leopard and it seems to work - I don't have a Leopard system to test it on. You could substitute any string of your choice between the quotes, and can include wildcards by using the * character. Having to enter "kMDItemTextContent == " is clumsy, though, and EasyFind might be a better choice.

  • Dynamic Security in a denormalized Parent-Child dimension Table

    Hi guys, I need your priceless help again:
    I have a parent child relationship in a table with a fixed depth, let´s say Region-->Area-->Country
    I denormalized the table to have something like this
    Then, to implement dynamic security, I think in a bridge table with the userId
    and the CountryId, then with a measure group and a measure which count the combination of user/country I can proof the security using the non empty function.
    My question is how can I also set security for the levels above the leaf members, let´s say, I want to assign an user to the Area level or Region Level. I don't know exactly which key could I include in the bridge table.
    I may want to keep the id´s of the original table in the different levels.
    Any comment will be appreciated.
    Kind Regards,

    Hi Paul,
    According to your description, you want to apply dynamic security on parent-child hierarchy. Right?
    In Analysis Services, when a dimension contains a parent-child hierarchy, we can't set up security directly on the key attribute. Because it will not appear on the dropdown list of Dimension Data Security in Role editor.
    In this scenario, we need to filter on key attribute and not the parent-child hierarchy. Then use Linkmember() to find the equivalent members on the parent-child hierarchy. Please refer to the expression below based on a employee dimension with parent-child
    hierarchy.
    Generate(
     NonEmpty(
      [Employee].[Employee].[Employee].Members,
       [Measures].[Employee Count],
       StrToMember('[User].[User].[' + UserName() + ']')
                 LinkMember(
                     [Employee].[Employee].CurrentMember,
                     [Employee].[Employees]
    Also I suggest an excellent book:
    Expert Cube Development with Microsoft SQL Server 2008 Analysis Services. It talks about this scenario in chap 9.
    Reference:
    SSAS
    Dynamic security - Bridge table (factless) between User dimension and Parent-Child (PC) dimension
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Parent-Child Join on tables in Database Adapter

    Hi,
    We are doing a join on two tables(T1 and T2) in Database adapter for an Insert operation. There is no Reference Integrity between these two tables in Database, but join is done through bpel database adapter.
    Here is a scenario - when we try to insert a record(parent-child), into these two tables, If there is any data issue in any of the child record, Adapter inserts parent-record, also inserts few child-records it processed before it encountered this data issue and terminates.
    Issue here is , We want this to be transactional, it means, If any of the child record fails adapter should rollback the entire insert operation both from parent and child tables and exit with an error. Instead BPEL inserting half records into child table.
    Is there any parameter I need to set or am I missing anything? Someone please suggest.
    Thanks,
    Phani

    There are a few options I guess.
    1. Add the referential key constraint.
    2. Add custom logic in your BPEL project to compensate for any errors you encounter in your BPEL processes.

  • Dynamic hierarchy in parent child hierarchy table??

    Do you have any experience to handle the requirement of dynamic hierarchy in universe/webi?
    We have some data in parent child hierarchy as below u201CCustomeru201D table.
    Customer
    Parent          Child
    Z                  A
    Z                  B
    A                  AA
    B                  BB
    AA               AAA
    For example, Company Z is the parent company of Company A.
    Another table, Amount is the amount value of different Customers.
    Amount
    ID               Amt
    AA               10
    AAA            1
    BB                2
    Is there any functionality in Universe designer to build related Classes and objects, So that the web intelligence documents represent the following report with the drilling results?
    When we want to see the ID and Amt, the expected result should be:
    Z                13
    when we drill down Z
    the result should be:
    A                11
    B                2
    when we drill down A:
    the result should be:
    AA              11
    notes **
    the level of hierarchy is dynamic
    Any suggestion is appreciated.  Thanks.

    Hi,
    The only way to do it is to create recursive derived table that flatten you parent child hierarchy with a given maximum depth.
    Here is a sample I built a long time ago to flatten a parent-child hierarchy on Employees table in Foodmart database (SQL Server).
    Didier
    SELECT DISTINCT
         Z.employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         A.supervisor_id_5,
         A.employee_id_5,
         A.full_name_5,
         A.supervisor_id_6,
         A.employee_id_6,
         A.full_name_6,
         Z.supervisor_id AS supervisor_id_7,
         Z.employee_id AS employee_id_7,
         Z.full_name AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              A.supervisor_id_4,
              A.employee_id_4,
              A.full_name_4,
              A.supervisor_id_5,
              A.employee_id_5,
              A.full_name_5,
              Z.supervisor_id AS supervisor_id_6,
              Z.employee_id AS employee_id_6,
              Z.full_name AS full_name_6
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   A.supervisor_id_3,
                   A.employee_id_3,
                   A.full_name_3,
                   A.supervisor_id_4,
                   A.employee_id_4,
                   A.full_name_4,
                   Z.supervisor_id AS supervisor_id_5,
                   Z.employee_id AS employee_id_5,
                   Z.full_name AS full_name_5
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        A.supervisor_id_2,
                        A.employee_id_2,
                        A.full_name_2,
                        A.supervisor_id_3,
                        A.employee_id_3,
                        A.full_name_3,
                        Z.supervisor_id AS supervisor_id_4,
                        Z.employee_id AS employee_id_4,
                        Z.full_name AS full_name_4
                   FROM employee Z,
                        SELECT DISTINCT
                             A.supervisor_id_1,
                             A.employee_id_1,
                             A.full_name_1,
                             A.supervisor_id_2,
                             A.employee_id_2,
                             A.full_name_2,
                             Z.supervisor_id AS supervisor_id_3,
                             Z.employee_id AS employee_id_3,
                             Z.full_name AS full_name_3
                        FROM employee Z,
                             SELECT DISTINCT
                                  A.supervisor_id_1,
                                  A.employee_id_1,
                                  A.full_name_1,
                                  Z.supervisor_id AS supervisor_id_2,
                                  Z.employee_id AS employee_id_2,
                                  Z.full_name AS full_name_2
                             FROM employee Z,
                                  SELECT DISTINCT
                                       supervisor_id AS supervisor_id_1,
                                       employee_id AS employee_id_1,
                                       full_name AS full_name_1
                                   FROM employee
                                   WHERE supervisor_id = 0 OR supervisor_id IS NULL
                             ) A
                             WHERE A.employee_id_1 = Z.supervisor_id
                        ) A
                        WHERE A.employee_id_2 = Z.supervisor_id
                   ) A
                   WHERE A.employee_id_3 = Z.supervisor_id
              ) A
              WHERE A.employee_id_4 = Z.supervisor_id
         ) A
         WHERE A.employee_id_5 = Z.supervisor_id
    ) A
    WHERE A.employee_id_6 = Z.supervisor_id
    UNION
    SELECT DISTINCT
         A.employee_id_6 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         A.supervisor_id_5,
         A.employee_id_5,
         A.full_name_5,
         A.supervisor_id_6,
         A.employee_id_6,
         A.full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              A.supervisor_id_4,
              A.employee_id_4,
              A.full_name_4,
              A.supervisor_id_5,
              A.employee_id_5,
              A.full_name_5,
              Z.supervisor_id AS supervisor_id_6,
              Z.employee_id AS employee_id_6,
              Z.full_name AS full_name_6
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   A.supervisor_id_3,
                   A.employee_id_3,
                   A.full_name_3,
                   A.supervisor_id_4,
                   A.employee_id_4,
                   A.full_name_4,
                   Z.supervisor_id AS supervisor_id_5,
                   Z.employee_id AS employee_id_5,
                   Z.full_name AS full_name_5
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        A.supervisor_id_2,
                        A.employee_id_2,
                        A.full_name_2,
                        A.supervisor_id_3,
                        A.employee_id_3,
                        A.full_name_3,
                        Z.supervisor_id AS supervisor_id_4,
                        Z.employee_id AS employee_id_4,
                        Z.full_name AS full_name_4
                   FROM employee Z,
                        SELECT DISTINCT
                             A.supervisor_id_1,
                             A.employee_id_1,
                             A.full_name_1,
                             A.supervisor_id_2,
                             A.employee_id_2,
                             A.full_name_2,
                             Z.supervisor_id AS supervisor_id_3,
                             Z.employee_id AS employee_id_3,
                             Z.full_name AS full_name_3
                        FROM employee Z,
                             SELECT DISTINCT
                                  A.supervisor_id_1,
                                  A.employee_id_1,
                                  A.full_name_1,
                                  Z.supervisor_id AS supervisor_id_2,
                                  Z.employee_id AS employee_id_2,
                                  Z.full_name AS full_name_2
                             FROM employee Z,
                                  SELECT DISTINCT
                                       supervisor_id AS supervisor_id_1,
                                       employee_id AS employee_id_1,
                                       full_name AS full_name_1
                                   FROM employee
                                   WHERE supervisor_id = 0 OR supervisor_id IS NULL
                             ) A
                             WHERE A.employee_id_1 = Z.supervisor_id
                        ) A
                        WHERE A.employee_id_2 = Z.supervisor_id
                   ) A
                   WHERE A.employee_id_3 = Z.supervisor_id
              ) A
              WHERE A.employee_id_4 = Z.supervisor_id
         ) A
         WHERE A.employee_id_5 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_5 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         A.supervisor_id_5,
         A.employee_id_5,
         A.full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              A.supervisor_id_4,
              A.employee_id_4,
              A.full_name_4,
              Z.supervisor_id AS supervisor_id_5,
              Z.employee_id AS employee_id_5,
              Z.full_name AS full_name_5
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   A.supervisor_id_3,
                   A.employee_id_3,
                   A.full_name_3,
                   Z.supervisor_id AS supervisor_id_4,
                   Z.employee_id AS employee_id_4,
                   Z.full_name AS full_name_4
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        A.supervisor_id_2,
                        A.employee_id_2,
                        A.full_name_2,
                        Z.supervisor_id AS supervisor_id_3,
                        Z.employee_id AS employee_id_3,
                        Z.full_name AS full_name_3
                   FROM employee Z,
                        SELECT DISTINCT
                             A.supervisor_id_1,
                             A.employee_id_1,
                             A.full_name_1,
                             Z.supervisor_id AS supervisor_id_2,
                             Z.employee_id AS employee_id_2,
                             Z.full_name AS full_name_2
                        FROM employee Z,
                             SELECT DISTINCT
                                  supervisor_id AS supervisor_id_1,
                                  employee_id AS employee_id_1,
                                  full_name AS full_name_1
                              FROM employee
                              WHERE supervisor_id = 0 OR supervisor_id IS NULL
                        ) A
                        WHERE A.employee_id_1 = Z.supervisor_id
                   ) A
                   WHERE A.employee_id_2 = Z.supervisor_id
              ) A
              WHERE A.employee_id_3 = Z.supervisor_id
         ) A
         WHERE A.employee_id_4 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_4 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         A.supervisor_id_4,
         A.employee_id_4,
         A.full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              A.supervisor_id_3,
              A.employee_id_3,
              A.full_name_3,
              Z.supervisor_id AS supervisor_id_4,
              Z.employee_id AS employee_id_4,
              Z.full_name AS full_name_4
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   A.supervisor_id_2,
                   A.employee_id_2,
                   A.full_name_2,
                   Z.supervisor_id AS supervisor_id_3,
                   Z.employee_id AS employee_id_3,
                   Z.full_name AS full_name_3
              FROM employee Z,
                   SELECT DISTINCT
                        A.supervisor_id_1,
                        A.employee_id_1,
                        A.full_name_1,
                        Z.supervisor_id AS supervisor_id_2,
                        Z.employee_id AS employee_id_2,
                        Z.full_name AS full_name_2
                   FROM employee Z,
                        SELECT DISTINCT
                             supervisor_id AS supervisor_id_1,
                             employee_id AS employee_id_1,
                             full_name AS full_name_1
                         FROM employee
                         WHERE supervisor_id = 0 OR supervisor_id IS NULL
                   ) A
                   WHERE A.employee_id_1 = Z.supervisor_id
              ) A
              WHERE A.employee_id_2 = Z.supervisor_id
         ) A
         WHERE A.employee_id_3 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_3 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         A.supervisor_id_3,
         A.employee_id_3,
         A.full_name_3,
         NULL AS supervisor_id_4,
         NULL AS employee_id_4,
         NULL AS full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              A.supervisor_id_2,
              A.employee_id_2,
              A.full_name_2,
              Z.supervisor_id AS supervisor_id_3,
              Z.employee_id AS employee_id_3,
              Z.full_name AS full_name_3
         FROM employee Z,
              SELECT DISTINCT
                   A.supervisor_id_1,
                   A.employee_id_1,
                   A.full_name_1,
                   Z.supervisor_id AS supervisor_id_2,
                   Z.employee_id AS employee_id_2,
                   Z.full_name AS full_name_2
              FROM employee Z,
                   SELECT DISTINCT
                        supervisor_id AS supervisor_id_1,
                        employee_id AS employee_id_1,
                        full_name AS full_name_1
                    FROM employee
                    WHERE supervisor_id = 0 OR supervisor_id IS NULL
              ) A
              WHERE A.employee_id_1 = Z.supervisor_id
         ) A
         WHERE A.employee_id_2 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_2 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         A.supervisor_id_2,
         A.employee_id_2,
         A.full_name_2,
         NULL AS supervisor_id_3,
         NULL AS employee_id_3,
         NULL AS full_name_3,
         NULL AS supervisor_id_4,
         NULL AS employee_id_4,
         NULL AS full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              A.supervisor_id_1,
              A.employee_id_1,
              A.full_name_1,
              Z.supervisor_id AS supervisor_id_2,
              Z.employee_id AS employee_id_2,
              Z.full_name AS full_name_2
         FROM employee Z,
              SELECT DISTINCT
                   supervisor_id AS supervisor_id_1,
                   employee_id AS employee_id_1,
                   full_name AS full_name_1
               FROM employee
               WHERE supervisor_id = 0 OR supervisor_id IS NULL
         ) A
         WHERE A.employee_id_1 = Z.supervisor_id
    ) A
    UNION
    SELECT DISTINCT
         A.employee_id_1 AS employee_id,
         A.supervisor_id_1,
         A.employee_id_1,
         A.full_name_1,
         NULL AS supervisor_id_2,
         NULL AS employee_id_2,
         NULL AS full_name_2,
         NULL AS supervisor_id_3,
         NULL AS employee_id_3,
         NULL AS full_name_3,
         NULL AS supervisor_id_4,
         NULL AS employee_id_4,
         NULL AS full_name_4,
         NULL AS supervisor_id_5,
         NULL AS employee_id_5,
         NULL AS full_name_5,
         NULL AS supervisor_id_6,
         NULL AS employee_id_6,
         NULL AS full_name_6,
         NULL AS supervisor_id_7,
         NULL AS employee_id_7,
         NULL AS full_name_7
    FROM employee Z,
         SELECT DISTINCT
              supervisor_id AS supervisor_id_1,
              employee_id AS employee_id_1,
              full_name AS full_name_1
          FROM employee
          WHERE supervisor_id = 0 OR supervisor_id IS NULL
    ) A

  • Graphs and parent-child with loops and duplicates

    There is a parent-child relation in the table t(prnt, chld) which allows duplicates (A->B, A->B) and opposite paths (A->B, B->A), and complicated loops. Is there a way to identify rows that form any separate "connections network" and assign a "name" to them of any kind (letter, number, wahtever)? I try to use WITH recursive clause to identify and group rows belonging to one graph but with no luck. Any help would be appreciated.
    thank you

    Frank, I posted inputs for all graphs (multiple inserts) and some allowable outputs for one graph. For all cases (ie. graphs) the rule is the same:
    1. identify all nodes belonging to a graph
    2. "name" that graph (min, max or whatever you like)
    3. print the output in the form (node_belonging_to_a_graph, name_of_the_graph) for all identified graphs
    And as you said, I am somewhat flexible. I don't want to constrain the problem with saying min, max because it's not important how you name it, but the way which is somehow natural and fits with requirements is the usage of nodes' values.
    You ask me if (1,1),(2,1),(3,1) is also OK as an output for sample graph (1,2)+(2,3). Yes it is. It is one of those I posted but with additional node which is chosen as a name for a graph. But as you can guess it doesn't matter which node you choose, and the additional information about a node named with its own name is not as important and the information that all other nodes are named with that name but it is 100% acceptable. If you changed the naming convention and started to use letters instead of node values then yes, it would be a must to have the output in the form (1,a),(2,a),(3,a).
    You also ask me about the result for 90x data inserted as 5 rows: (901,902)..(906,904) and present sample result:
    901 902
    905 902
    906 902
    And the answer is no, it is not good result. It misses the information about the nodes 904 and 903 which belong to this graph too. The correct result could be:
    901 902
    905 902
    906 902
    903 902
    904 902
    or any other "combination" which presents 5 nodes with the name of the sixth (in this case of 6-node graph). Just one have to be picked, it doesn't matter which one. The "vertical" order is also irrelevant.
    As you can see there is a lot of room that gives acceptable result. I don't want to constraint it because it can influence performance which is important when dealing with graph structures in relational databases (RDBMS are not predestined to easily cope with that sort of information). It can also influence the chosen algorithm and I'd like to pick the fastest one which gives acceptable result.
    Two numbers x and y are in the same group (graph) if (and only if) at least one of the following is true:
    (1) they appear on the same row together (it doesn't matter which number is in which of the 2 columns), or
    --(2) x appears on the same row with a third number, z, and z is in the same group as y--
    (2) there are other edges (entries) in the table that form a "path" from x to y. And because the direction of the path is not important for the problem (ie. the parent-child table structure can be forgotten for a moment), the path means "there exists connection" between x and y aka "you can walk from x to y".
    The output consists of 2 columns: id (which is unique in the result set) and grp (which identifies the group) *[correct]*
    The id column will always be one of the numbers in the group *[correct]*
    It doesn't matter what the grp column is, or even what data type, as long as it distinguishes between the different groups. *[correct, but as you noted using one, picked number from a graph is the prefferable way]*
    If there are N distinct numbers in the group, I need N rows of output for that group, with id showing all those distinct numbers. *[correct, but if you choose your naming convention as naming a graph with the value of the node belonging to it you can ommit the node which is named for itself (but it doesn't hurt is such row appear in the result)]*
    You ask me if the graph is directed. No it's not. Your example (x,y) and (y,x) is great, and it can be concluded from my first post when I say that "opposite paths" (A->B, B->A) exists. What matters is the connection between the nodes. The parent-child table somehow imposes that direction is important, but for this problem it is not.
    One of the motivations for my post is to know what other people think without affecting their minds with my approach. I don't want to skew anybody's mind into my solution which works, but it's not effective. I don't mind showing it but I kindly ask you to think about the problem before I post it. Diversity of approaches helps to distill the best one.
    As I said I did it with the usage of sys_connect_by_path. If it doesn't appear to you as possible usage then it is likely that I don't use it efficiently. Please understand, I will post it if you ask me one more time but if you can live for a while without my inefficient solution and suggest something with WITH clause I would appreciate it.
    There is no exact result I expect. There are many results which are correct and acceptable. They all must follow the rules described at the beginning.
    Thank you
    Edited by: 943276 on Jun 28, 2012 1:32 AM

  • Parent/Child "itemkey"

    I have a parent/child relatonship between 2 tables. Both tables have dataless keys (both just populated by different sequence numbers starting at 1). I want to create Parent and Child processes (in the same workflow itemtype) to represent the records in the application tables.
    What should the "itemkey" be for the child process? (I can't have the same "itemkey" as the parent record).
    -- using the Oracle demo Survey workflow names:
    begin
    -- PK of parent record=1
    wf_engine.CreateProcess(ItemType => 'WFSURV',
                        ItemKey => to_char(1),
                        process => 'SURVEY2');
    -- PK of child record=1
    wf_engine.CreateProcess(ItemType => 'WFSURV',
                        ItemKey => to_char(1),
                        process => 'CHILDSURVEY');
    end;
    ORA-20002: 3122: Duplicate item 'WFSURV/1' could not be created.
    ORA-06512: at "OWF_MGR.WF_ENGINE", line 3000
    ORA-06512: at line 5
    Can I build up my child "itemkey" by having {PK of parentrec}||'-'||{PK of childrec} to ensure that it wont conflict with the "itemkey" for the parentprocess?
    e.g.
    begin
    wf_engine.CreateProcess(ItemType => 'WFSURV',
                        ItemKey => to_char(1),
                        process => 'SURVEY2');
    wf_engine.CreateProcess(ItemType => 'WFSURV',
                        ItemKey => to_char(1)||'-'||to_char(1),
                        process => 'CHILDSURVEY');
    end;
    I'd like to implement this as cleanly as possible. Any suggestions welcome.

    You could just prefix each item key with the process name or some other distinguishing string -
    'SURVEY2:' || {PK of parent table}
    'CHILDSURVEY:' || (PK of child table)
    or
    'P' || {PK of parent table}
    'C' || (PK of child table)

  • SQL for Parent-Child Hierarchy

    Please suggest which would be best way to achieve the below logic.
    SQL to pick up parent child relationship within same table with a certain logic.
    Example:
    mod_product_number     Product_Hierarchy     
    H555888     PH05678     
    H888987     H555888     
    H8889     H555888     
    H9955     H555888     
    H999999     H555888     
    P6666     H999999     
    P5555     H999999     
    Example: I expect the rows with H8889,H9955 & P6666 & P5555 to be sub-category values value for product hierarchy H555888.     
    If there are rows with H8888987 as Product_hierarchy, we will pull up those rows too for product hierarchy H555888.
    The extra condition is we drill down only on 7 character mod_prod_number not on 5 character mod_prod_number. We pull out all sub category mod_prod_number for all distinct Product hierarchy.

    You can use Hierarchical Queries
    See.. http://docs.oracle.com/cd/E11882_01/server.112/e10592/queries003.htm
    select lpad(' ',2*(level-1)) || to_char(trim(t.mod_product_number)) prod,
      SYS_CONNECT_BY_PATH(t.product_hierarchy, '/') "Path",
      LEVEL
      from temp_table t
      start with trim(t.product_hierarchy) = 'PH05678'
      connect by prior trim(t.mod_product_number) = trim(t.product_hierarchy);
    .     PROD          Path                    LEVEL
    1     H555888          /PH05678                1
    2       H8889          /PH05678 /H555888           2
    3       H888987     /PH05678 /H555888           2
    4       H9955          /PH05678 /H555888           2
    5       H999999     /PH05678 /H555888           2
    6         P5555     /PH05678 /H555888 /H999999      3
    7         P6666     /PH05678 /H555888 /H999999      3

  • No data for Parent-child hierarchy column in Pivot table view

    Hi all,
    I used OBIEE 11.1.1.6.2 Version.
    I drag one Parent-child hierarchy column and one measure and show result with a pivot table view.
    But when I click "+" icon to show detail level data,
    It messaged that: "*the layout of this view combined with the data,selections,drills,or prompt values chosen resulted in no data*."
    But it can show every-level data when I used table view.
    It was so strange..
    Did anybody meet this before?
    Thanks in advance.
    regards,
    Anne

    Hi,
    Yes, I have the same problem with pivot table for hierarchy dimension.
    If you use a normal table (not pivot) it seem to work. Unfortunatley with restrictions as normal table view have.
    Same problem still exist in 11.1.1.6.5
    I have logged a SR to Oracle about this.

  • Insert Record with Parent/Child Tables doesn't work with Oracle - unlike AC

    Hi,
    I just Migrated a MS Access 2010 Database to an Oracle 11g Backend with the SQL Developer Tool.
    The Migration went fine, all the Tables and Views are migrated.
    I'm working with MS Access as Frontend.
    The application has some Datasheets with Subdatasheets with Parent/Child Relationship. (1-n Relationship)
    After changing to Oracle, it's not possible, to Insert a new Record in a Subdatasheet I always get the following Error Message:
    "The Microsoft Access database engine cannot find a record in the table 'xxxx' with key matching field(s) 'zzzzz'"
    It used to work perfect with the MS Access Backend, do I need a trigger which first adds the child Record ?
    Or what should I do?
    Thank you

    Hi Klaus,
    Thanks for your answer. I still haven't solved my problem. The only way would be to use a singel 1:n Relationship, but in fact I need a n:m Relationship.
    I tried the same scenario with a new Access Application, same result.
    To clearify my problem.
    Goal: Parent Form with Parent Records, Linked Child Form with Child Records in a Datasheet View => Insert of a NEW Child Record.
    I have 3 Tables (table1 = Parent tabel, table2 = Child Table, table12 = n:m Tabel with PK and two FK)
    The Recordsource of the Parent Form is Tabel1
    The Recordsource of the Child Form is Table2 joined with Table12.
    In my Old Access Project, Access Triggered the Insert and filled Table12 with the NEW PK of Table2.
    It seems like Access can't do that anymore....
    I'm pretty desperate and I'm sure it is just a litte thing to fix.....

  • Sub Total value is empty in  parent child hierarchy pivot table

    Hi All,
    I am using obiee 11.1.1.6.2 in Test environment. Is it a known issue/bug for 11.1.1.6.2 to show empty/blank values for sub total when using parent child hierarchy pivot table. The sub total for parent value is showing but sub total for child value is coming blank. However, in 11.1.1.5.0, we do not have any issue with this.
    Is it a known bug in obiee 11.1.1.6.2?
    Thanks,
    Sushil

    Yes it is a known bug...
    Thanks.

Maybe you are looking for

  • HP C309 G AIO can't install in Windows 7 64bit  running under BootCamp

    HP C309 G Printer wont install in Windows 7 64bit running under BootCamp on a new iMac Just bought a new iMac. Installed HP C309 all in one without incident on the Mac side. I am also running Windows 7 on iMac through a program called Bootcamp. When

  • Freehand X quits when I go to print

    I just got a 20" iMac Duo. Everytime I go to print from Freehand X the application quits "unexpectedly". But it will sometimes go ahead and print though the print will look pretty crummy. I am printing to a Canon printer (not postscript). I can print

  • Is there a TLOG? What's wrong?

    Hi, How can I find out if my application has a TLOG device configured. In the dmconfig I see that the parameter DMTLOGDEV is set. Often I see this following error in the ULOG - LIBGWT_CAT:1042: ERROR: Can't open domain log What could be going on? Wil

  • Can't import MIDI file

    I am not able to drag a MIDI file into Garageband 3.0.4. I know I've been able to do this in the past but when I drag the file to a track or the blank area below the tracks nothing happens. Any ideas?

  • Envelope sender domain could not be resolved

    For this error: Apr 23 18:11:07 2008 Info: ICID 815272710 Address: <nurmaria> sender rejected, envelope sender domain could not be resolved If the domain has multiple MX(es) record. I.e cardig.com has : cardig.com mail is handled by 10 mail.cardig.co