Connect By Parent Child with @@@@@g5@@@

Hi,
I am having a problem to create a query wich has child accounts like @@B6565@@@@@@@ this in connect by clause. So that is not only one hundrerds of child account like that exist.
What can I do about that to include all those accounts in my query of connect by clause.

I don't see any problem here... Are you sure these are the records which cause problem?
WITH T1 AS
SELECT '1000@@@' Parent , '10101' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10110' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10111' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10112' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10120' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10121' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10124' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10151' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10152' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10153' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10154' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10155' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10158' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10170' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10171' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10172' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10173' Child FROM DUAL UNION ALL
SELECT '1000@@@', '10174' Child FROM DUAL )
SELECT  *
FROM    T1
START   WITH PARENT = '1000@@@'
CONNECT BY NOCYCLE PARENT = PRIOR PARENT;*009*

Similar Messages

  • 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

  • OBIEE11g - Hierarchy parent-child with a factable measure(poor performance)

    Hi
    I have a star model with a hierarchy parent child, joined to the fact table.
    Creating a new analysis, and adding the hierarchy column with any other field from any dimension (on selected columns or filters) all works fine, and the hierarchy displays every level very fast.
    But adding a measure from the fact table, the hierarchy performance drops dramatically and I have to wait 20-30 seconds to see each new level displayed.
    Taking a look at the SQL launched, seems to be all right:
    The measure is a COUNT(DISTINCT factable.field) and the group by is done by Parent,Child fields in the hierarchy table.
    Is there any other way to set up this hierarchy? Why the measures are reducing the performance?
    Any comment will be helpful.
    Thanks in advance.

    Try these
    Use Oracle Enterprise Manager (EM) URL to monitor end to end OBIEE real time performance: http://<server>:7001/em
    In Oracle Business Intelligence 11g, the perfmon URL is still valid to use i.e. http://<server>:9704/analytics/saw.dll?Perfmon
    Check these
    http://www.rittmanmead.com/files/biforum2012/ranka_performance.pdf
    http://docs.oracle.com/cd/E17904_01/web.1111/e13814/jvm_tuning.htm
    https://blogs.oracle.com/pa/entry/obiee_ibm_jdk_tuning_for
    Support note OBIEE 11g Infrastructure Performance Tuning Guide Doc ID 1333049.1
    If helps mark and update back :)

  • Updating records for parent & child with integrity constraints

    Hello, I haven't used oracle in a few years and now running a lab and need to make a few changes for testing. no production data at all.
    What is the easiest way to change the parent and child tables? When I try to change the parent, oracle barks that the child is neglected, when i try to change the child first, then the parent is mad.
    If I need to set up a trigger, what is the simplest form?
    thanks much!

    Depends on what you want your data to look like. Since it's test, I would do what janeesh said. Disable the constraint on the tables, write a script to UPDATE all the necessary values in the parent and child table, and then re-enable the constraint.
    I like the idea of setting the constraint to ENABLE VALIDATE afterwards to check the data in the tables. This verifies that all the updates you did comply with the constraint. Essentially this just checks to see if you hosed anything in either table.

  • Entity Currency Adj, Parent Currency adj for Parent-child with same currenc

    Hi,
    In 11.1.2.1 I noticed that if parent and base entity currencies are same, entity currency and entity currency adjustments equal parent currency and parent currency adjustments respectively. If the currencies are different, the entity currency total gets translated to parent currency and post that, we can pass adjustments at PCA level.
    I had an understanding that Entity Currency total always rolls upto Parent currency irrespective of whether the currencies of base and parent are same/different.
    Is this something new with version 11 or has it always been like this?
    Thanks,
    S

    I don't follow your explanation. To be very clear: <Parent Curr Adjs> is NOT the translation of <Entity Curr Adjs>. This will never happen. HFM takes <Entity Curr Total> and translates that into the target currency. The only time <Parent Curr Adjs> will equal <Entity Curr Adjs> is when they are indeed the very same currency. In that case there is no translation but instead two names for the same data set.
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Connect By Parent Child

    Hi,
    I am using a vary simple command to check how many rows will be selected. But the problem is that this is continiously running and nit finsihing, even if I will create a view on this and then try to acces that view same stuff happen, the table has 3 millions of records, please need your help find an easy eay to figure it out;
    select count(*) from (
    select *
    from test
    start with account_code='MMJH8999'
    connect by prior sub_acct_code = account_code
    );

    Hi Frayan,
    Thanks for the reply. The table has only three columnss like Profit_Centre, account_code and sub_Acct_code
    that is exactly doing what I want really, if I will run quey
    select *
    from account_test
    start with account_code='DHL9890'
    connect by prior sub_acct_code = account_code
    It will return rows and all the rows which I needed but to put this query in table or in a view it could not respond. Dont know whats going wrong over here
    Someoneelse is right; there's a lot of information missing.
    You don't necessarily need a WHERE clause, and the lack of one isn't what's making the query slow. In fact, a WHERE clause would only make things slower, since it is applied after the CONNECT BY finishes.
    Are you sure the CONNECT BY is doing what you want?
    Can you post a little sample data (CREATE TABLE and INSERT statements), and the results you want from the sub-query given that sample data?
    Is sub_acct_code unique? Is account_code unique?
    Is the query really only using one table? Is that "table" actually a view, based on a join?

  • Increment Counter in Parent / Child

    I am generating classes from an existing schema.
    I have two tables that are Parent / Child with the parent containing an
    incrementing counter that is part of the Child primary key.
    Is there a way to describe this relationship so that the generated code has
    the rationship properly described?

    I have a parent table, 'CARD_HOLDER' that has a key of ID_CARDHOLDER
    (integer) and a row of CURRENT_SEQ_NO (integer).
    The child table, 'CARD' has a key of ID_CARDHOLDER (integer) and SEQ_NO
    (integer) [both colums are the key value].
    When a new card is added to the 'CARD' table, the CARDHOLDER.CURRENT_SEQ_NO
    is incremented and the CARD.CURRENT_SEQ_NO is set equal to it.
    Can I emulate this behavior in KODO?
    When a new 'card'
    "Abe White" <[email protected]> wrote in message
    news:[email protected]..
    Sorry, could you describe the table structure in more detail? I'm not
    sure I follow.

  • Parent-Child post order exception; FK constraint violation

    I've seen the discussion and answer recently in this forum for configuring BC4J
    to post the parent first, then the child, to avoid the FK constraint exception??
    So I have to appologise for re-asking, but I can't get the search function to find
    any thing that needs multiple key words. :(
    I've got two Entities, parent child, with Links, and Association between them on the FK.
    What was the trick to get the framework to correctly post the parent first??
    I've looked over the FkLink and FkAssoc and all these components are included by
    the AppModule...
    Thanks, curt

    Edit the association object between your parent and child entities and set the "Composition" flag (Composite Assocation in the UI), to true. You may elect to enforce "CascadeDelete" option, if you have database Cascade-delete turned on between the associated tables and want to avoid multiple DMLs for the details.

  • Parent-child hierarchy and fragmentation content

    Hello,
    I've tried to build simple model with OBIEE 11 using Oracle 11r2 as a data source. BMM has fragmentation content for fact table and few dimensions with different hierarchy types. It works fine with all hierarchy types except for parent child.
    When I build an answer with parent child hierarchy it terminates with error "Target data source does not support the operation".
    Does OBIEE 11 not support parent child with fragmentation content? Or am I missing something?
    Greetings
    Marcin

    I'm seeing the same issue. I've created a parent-child hierarchy along with two normal level-based hierarchies (one "normal", one skipped-level). The two level-based hierarchies work just fine in Answers. I can include them in the criteria, and data is displayed with the correct drilldowns.
    If I include the parent-child hierarchy, I get the same results as noted in the original post: "The layout of this view combined with the data, selections, or drills, or prompt values chosen, resulted in no data." I'm trying to look at the table view, with no filters.
    Interestingly, I can explicitly include that dimension's Parent column and Member column in the criteria, and data is displayed just fine.
    Here is the XML for the set of criteria that includes the separate Parent and Member columns (the one that works):
    SELECT s_0, s_1, s_2, s_3, s_4, s_5, s_6, s_7, s_8, s_9, s_10, s_11 FROM (
    SELECT
    0 s_0,
    "Retro_Biz"."Channels"."MEMBER" s_1,
    "Retro_Biz"."Channels"."PARENT" s_2,
    "Retro_Biz"."Products"."TOTAL_PRODUCT" s_3,
    "Retro_Biz"."Times"."YEAR" s_4,
    SPACE(1) s_5,
    SPACE(1) s_6,
    SPACE(1) s_7,
    IDOF("Retro_Biz"."Products"."Product"."Total Product") s_8,
    IDOF("Retro_Biz"."Times"."Time"."Year") s_9,
    "Retro_Biz"."Facts"."SALES" s_10,
    CAST(NULL AS DOUBLE) s_11
    FROM "Retro_Biz"
    UNION ALL
    SELECT
    1 s_0,
    "Retro_Biz"."Channels"."MEMBER" s_1,
    "Retro_Biz"."Channels"."PARENT" s_2,
    SPACE(1) s_3,
    SPACE(1) s_4,
    SPACE(1) s_5,
    SPACE(1) s_6,
    SPACE(1) s_7,
    SPACE(1) s_8,
    SPACE(1) s_9,
    CAST(NULL AS DOUBLE) s_10,
    REPORT_SUM("Retro_Biz"."Facts"."SALES" BY ) s_11
    FROM "Retro_Biz"
    ) djm ORDER BY 1, 5 ASC NULLS FIRST, 4 ASC NULLS FIRST
    Here is the XML that includes the Parent-Child hierarchy (the one that fails):
    SELECT s_0, s_1, s_2, s_3, s_4, s_5, s_6, s_7, s_8, s_9, s_10, s_11, s_12 FROM (
    SELECT
    0 s_0,
    "Retro_Biz"."Channels"."MEMBER" s_1,
    "Retro_Biz"."Products"."TOTAL_PRODUCT" s_2,
    "Retro_Biz"."Times"."YEAR" s_3,
    CASE WHEN ISLEAF("Retro_Biz"."Channels"."Channel") THEN 1 ELSE 0 END s_4,
    IDOF("Retro_Biz"."Channels"."Channel") s_5,
    SPACE(1) s_6,
    SPACE(1) s_7,
    SPACE(1) s_8,
    IDOF("Retro_Biz"."Products"."Product"."Total Product") s_9,
    IDOF("Retro_Biz"."Times"."Time"."Year") s_10,
    PARENT("Retro_Biz"."Channels"."Channel") s_11,
    "Retro_Biz"."Facts"."SALES" s_12
    FROM "Retro_Biz"
    WHERE
    ISROOT("Retro_Biz"."Channels"."Channel")
    UNION ALL
    SELECT
    1 s_0,
    SPACE(1) s_1,
    SPACE(1) s_2,
    SPACE(1) s_3,
    CAST(NULL AS INTEGER) s_4,
    SPACE(1) s_5,
    SPACE(1) s_6,
    SPACE(1) s_7,
    SPACE(1) s_8,
    SPACE(1) s_9,
    SPACE(1) s_10,
    SPACE(1) s_11,
    "Retro_Biz"."Facts"."SALES" s_12
    FROM "Retro_Biz"
    WHERE
    ISROOT("Retro_Biz"."Channels"."Channel")
    ) djm ORDER BY 1, 4 ASC NULLS FIRST, 3 ASC NULLS FIRST

  • Xcelsius Parent/Child SWF Loader with BICS Connections

    We have several Xcelsius Dashboards that use BICS connections to retrieve data from BW queries that we'd like to combine into one Parent/Child tabbed dashboard. I can't seem to find solid information on if this is possible using a SWF Loader component due to the BICS requirement of being published through BW Portal and not InfoView. Does anyone have any ideas (short of combining them into one huge dashboard due to the volume of data)? Thanks!

    Hi Chris,
    I have been working with SWF loader on the SAP portal using the BICS connection type. It was not supported last time I asked about a year ago. However, it can work if you specify the URL in the SWF loader in this way:
    http://sapwebdisp.vestas.net:8103/bicsremotebex?SWF=XXX&TIMESTMP=1318867468000
    XXX is the name you publish your child dashboard under. Data can be exchanged between the parent and child dashboard by using the custom component "Data sharer" from Inovista which can be downloaded for free:
    http://www.inovista.com
    Besides the fact that this setup is unsupported there are some limitations so from my point of view it should only be applied under the following conditions:
    1. It is not possible to build eveything into a single dashboard.
    2. A solution having several independent dashboards does not make sense.
    An alternative might be the setup described in note 1526291. The way I understand it, it binds the dashboards together in a similar way as on a BO server with flash variables.
    Regards,
    Michael

  • Incorrect totals from cache with CustomRollupColumn and non-parent-child dimensions

    Hello. Before I start let me apologise for my English :)
    We have a very complex cube, with 2 (actually more, but only these 2 are important) parent-child dimensions.
    One of them has CustomRollupColumn defined.
    Not long ago we have decided to make refactoring of our cube. This also included making these dimensions non-parent-child.
    All our old reports started to work much faster after that... but we have mentioned that sometimes they show incorrect totals, or no totals at all.
    We spend a lot of time trying to figure out what's wrong and finally we had found that if we clear cache before next refresh of the report - the totals are always correct!
    If we don't clear cache - we get wrong totals second time, and each next time after that. If we see wrong totals - we could clear cache and get correct totals once again.
    If we use "Real Time Olap=True;" connection string parameter - the totals are always correct because cache is not used.
    But we don't like this workaround.
    Is there any fix for this bug? Google shows that this problem exists from SQL2005, and still we have it :( Also, there is adivice to set CalculationCoverPolicy to 9 - we have tried - but it was fruitless.
    And if we revert these 2 dimensions back to parent-child - all working fine again, but as slow as it was before the refactoring :(

    Hi Bateks,
    Glad to hear that your issue had been solved by yourself, thank you for you sharing which will help other forum members who have the similar issue.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Parent / Child Groups in Portal with LDAP

    Heya,
    we are using EP 7 on SP 10 (NW 7), for User Authentication we use the UME with a configured (writable) LDAP
    Server as backend with a flat hierarchie. We have a Federated Portal Landscape with
    3 Portals connected to one "main" portal and using Remote Role Assignement on the main portal for
    our right managenemt.
    Remote Roles which are added to Groups are working fine, but as soon as we try to use
    the parent/child group functionality we are facing the problem that the user who logs on
    has no access to anything in this group.
    According to http://help.sap.com/saphelp_nw04s/helpdata/en/af/0cfc3f09c2c442e10000000a1550b0/frameset.htm
    the only restriction for the use of child / parent groups is that:
    "If user management is set up with write access to an LDAP directory, the following restriction applies:
    When assigning members to a group that is stored in the LDAP directory, you can only assign users or
    groups that are also stored in the LDAP directory. You cannot assign users or groups from the database
    to groups from the LDAP directory. "
    We fullfill the above condition (everything is LDAP based) - sooo: Any Hints for me / Someone facing
    the same problem.
    Thanks,
    Marco

    Hi Murali,
    User Configuration
    A particular company has the following setup:
    &#9679;      Two roles: External and Internal
    &#9679;      The role Internal contains users who also belong to two user groups: N.America and Asia
    &#9679;      User A belongs to both the role Internal and the user group N.America
    &#9679;      User B belongs to both the role Internal and the user group Asia
    &#9679;      User C belongs to the role External
    Conditions Defined in Portal Display Rules
    1. If Group = N.America
       Then Portal Desktop = Orange Flavor
    2. If Role = Internal
       Then Portal Desktop = Green Flavor
    3. If Group = Asia
       Then Portal Desktop = Blue Flavor
    4. If Role = External
       Then Portal Desktop = Red Flavor
    Note that user A matches conditions 1 and 2; (ii) user B matches conditions 2 and 3; and (iii) user C matches condition 4.
    Results
    According to the list of priorities, these are the results:
    &#9679;      User A receives portal desktop "Orange Flavor" (according to condition 1 which has priority over rule 2)
    &#9679;      User B receives portal desktop "Green Flavor" (according to condition 2 which has priority over rule 3)
    &#9679;      User C receives portal desktop "Red Flavor" (according to condition 4)
    still any help on portal disktop rules to can see this link http://help.sap.com/saphelp_nw70/helpdata/EN/4b/29cf122f414721964269e1b675d62c/frameset.htm
    if helpful don't to give points
    thanks
    best regards
    ep

  • Hide parents in a parent-child hierarchy with dynamic rights

    Hi all,
    I'm facing the following issue with dynamic rights on a parent-child hierarchy:
    scenario:
    - a cube with a company parent-child hierarcy
    - dynamic security on through a role on dimension data based on a list with user (login names) and their
    departments, with Enable
    Visual Total is switched ON 
    - Multiple facts connected to this hierarchy.
    When a user connects to the cube (in this case with Excel or through a dashboard in Performance Point services) he/she is allowed to see the facts belonging to theirs departments and all child departments, so far so good. But the totals of the facts are
    repeated for all higher parents. Now i know thats nog 'wrong' but our users think thats very confusing in some cases, so is there a way
    - to hide the parents in the hierarhcy
    - or to set all the parent measures to null/empty?
    I prefer to make a solution in the cube so that all client programs can benefit from this solution.
    thanx in advance for all input!

     so that User A have scope: [Dimension_Name].[Attribute XYZ] and User B: [Dimension_Name].[Attribute ABC] ?
    Hi Wilfred,
    If I understanding correctly, you want different user can see different dimension attributes based on the different right on role, right? 
    Based on my research, it seems that there is no a directly way to achieve this requirement. What we can do is that "Deselect all members" for each attribute of the dimension in Dimension Data tab, which will hide all members of the dimension for the role.
    Even the dimension metadata is visible in the cube in clients, its members can't be seen. Here are some useful links for your reference.
    http://saysmymind.wordpress.com/2013/01/15/hide-a-specific-attribute-hierarchy-in-role-playing-dimension-ssas-multidimensional/
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e2596eec-7c2d-48c0-8e81-538a8c632360/hide-dimension-based-on-roles
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Traditional ACD Integration with UCCE without Parent/Child model

    Hi
    I want to integrate a existing TDM ACD with UCCE 10. Could someone guide me on the required hardware, software on Cisco as well as on the TDM ACD side for this to work. Is parent/child architecture a mandate for this to work
    P.S: Traditional ACD and Cisco UCCE are already installed and working
    Regards
    Prakash

    Hi,
    well, brave move :-)
    Hi, the SRND explains the optional deployment models. Also check the compatibilty matrix.
    Looks like the TDM switch must already have some kind of IP connectivity.
    G.

  • Query Help with Parent, Child, Child's Child

    Hi all,
    Need some help with a query.  I'm trying to create a stored procedure that is sort of like a Customer, Order, Order, Details.  In my situation the tables are different but nevertheless, I want to grab all the fields from the  Parent, Child,
    and Childs' Child, where the Parent.ParentID = @Parameter.  I tried this:
    CREATE PROCEDURE [dbo].[spGetCompleteProjectXML]
    @ProjectID int = 0
    AS
    SELECT *,
    (SELECT *,
    (SELECT *
    FROM PageControls
    WHERE (PageControls.ProjectPageID = ProjectPages.ProjectPageID))
    FROM ProjectPages
    WHERE (ProjectPages.ProjectID = @ProjectID))
    FROM Projects
    WHERE (ProjectID = @ProjectID)
    FOR XML AUTO, ELEMENTS
    RETURN 0
    I think I'm close, but it was my best effort.  Could someone help?
    thanks in advance

    Hi TPolo,
    Regarding your description, are you looking for a sample like below?
    CREATE TABLE customer(customerID INT, name VARCHAR(99))
    INSERT INTO customer VALUES(1,'Eric')
    INSERT INTO customer VALUES(2,'Nelson')
    CREATE TABLE orders(orderID INT,customerID INT)
    INSERT INTO orders VALUES(1,1);
    INSERT INTO orders VALUES(2,1)
    INSERT INTO orders VALUES(3,2)
    INSERT INTO orders VALUES(4,2)
    CREATE TABLE orderDetails(orderID INT,item VARCHAR(99))
    INSERT INTO orderDetails VALUES(1,'APPLE1')
    INSERT INTO orderDetails VALUES(1,'BANANA1')
    INSERT INTO orderDetails VALUES(2,'APPLE2')
    INSERT INTO orderDetails VALUES(2,'BANANA2')
    INSERT INTO orderDetails VALUES(3,'APPLE3')
    INSERT INTO orderDetails VALUES(3,'BANANA3')
    INSERT INTO orderDetails VALUES(4,'APPLE4')
    INSERT INTO orderDetails VALUES(4,'BANANA5')
    SELECT customer.customerID,customer.name,
    (SELECT orderId,
    SELECT item FROM orderDetails WHERE orderID=orders.orderID FOR XML AUTO,TYPE,ELEMENTS
    FROM orders Where customerID=customer.customerID FOR XML AUTO,TYPE,ELEMENTS)
    FROM customer WHERE customerID=1
    FOR XML AUTO,ELEMENTS
    DROP TABLE customer,orderDetails,orders
    If you have any feedback on our support, please click
    here.
    Eric Zhang
    TechNet Community Support

Maybe you are looking for

  • Auto Approve of Workflow in Seconds

    Hi Experts, I want to auto approve workflow based on certain conditions. But the approval should be in seconds instead on MIN. please guide me. -Regards Rohit

  • Best Practice for Laptop in Field, Server at Home

    I'm sure this is a common workflow. If somebody has a link to the solution, please pass it along here. I keep all my images on a server at home. I would like to keep that as the repository for all my images. I also have a laptop that I am going to us

  • Iphoto wont recognize memory card to load pictures

    all of a sudden iphoto wont recognize the memory card to import pictures. when you put card in reader iphoto launches but you dont see the card on the left hand side and it doesnt ask you to import the pictures. If you remove the card you get device

  • Flash works very slow

    Well, flash video (for example, an Youtube) works slow.

  • Intergrating Change Request management with satellite systems

    Hi, We are using SOLMAN with SCM functionality.We have integrated it r/3 and now integrating with XI.I have created the logical componenet for the system and added to the maintenance project.But when i enable the project for change request management