Need to concat nodes

SQL> declare
2 x1 xmltype := xmltype ('<a>1</a>');
3 x3 xmltype;
4 begin
5 select xmlconcat (x1, xmlconcat(xmlsequence(cursor(select * from T_suspect_makers where case
_id=5))))
6 into x3
7 from dual;
8
9 dbms_output.put_line (x3.getstringval ());
10 end;
11 /
declare
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected - got -
ORA-06512: at line 5
why this error is coming?
what I need to actually is:
I need to have a output like:
<table_name>table1</table_name>
<ROW>
<CASE_ID>5</CASE_ID>
<PROS_SEQ>183934</PROS_SEQ>
<SM_CODE>S</SM_CODE>
</ROW>

what I need actually is: I need to have a output like:Something like this?:
SQL>  declare
x1   xmltype := xmltype('<table_name>table1</table_name>');
x3   xmltype;
begin
select xmlforest(xmlconcat(x1, 
                            xmltype(cursor(select empno, ename, job, sal from emp where empno=7788)).extract('ROWSET/*'))"table")
  into x3
  from dual;
  dbms_output.put_line (x3.getstringval ());
end;
<table><table_name>table1</table_name>
<ROW><EMPNO>7788</EMPNO><ENAME>SCOTT</ENAME><JOB>ANALYST</JOB><SAL>3000</SAL></ROW></table>

Similar Messages

  • Help needed in deleting nodes from RAC database

    Our DB is 10g RAC database and the servers are Window 2003 server. Initially the database was configured to have 4 nodes. For some reason we stopped the instances in the first two nodes and the current database is running on node3 and node4. I queried the v$thread view and it shows 3 records. Thread 2 is closed and disabled. Thread 3 is open and public and thread 4 is open and private. Now we need to disconnect nodes 1 and 2 from RAC db and cluster ware (We use Oracle cluster ware) and plan to use those two servers for other purposes. Although I read through the Oracle doc regarding deleting node from RAC “11 Adding and Deleting Nodes and Instances on Windows-Based Systems” and wrote down the steps we need to take but I am still not comfortable in doing it since it is production env and we don’t have any dev env to practice those steps. So I would like to borrow your experiences and your lessons learned while you were doing those. Please share your thoughts and insights with us.
    Thank you so much for your help,
    Shirley

    what's your full version? I can warn about specific issues in 10.1.0.3 and 10.2.0.1 - for example, in some cases (depending on how the listener was configured), it will be impossible to delete the listener for the deleted node. Known bug.
    To avoid many many known bugs, you may want to upgrade to at least 10.2.0.2 before removing a node (from my experience, this is the first stable RAC version).
    In any case, deleting a node is a rather delicate process. I really really recommend practicing. Take any pc/laptop, install VMWARE, define two virtual machines, install RAC and remove one node. It will take you an extra day or two, and could save your production.

  • I need in Formula Node to assign to the variable value 4000000000!!! What kind of variable it should be???

    i've just tryed to write unsigned in32, but it does not understand 'unsogned'... But i need variable to be unsigned, because the max value = 4000000000... So, how can i solve this probleme???

    Hi,
    I don't see exactly what you're trying to do here.
    Where do you want to assign the variable 4000000000 to? If you want it as an
    input, just use a dbl, with only zeros behind the coma.
    Note that an integer is a number without any decimals. An integer in LabVIEW
    is this, but with an extra limitation that it can only be 32 bits... So a
    dbl can be an integer.
    If the input dbl is not an integer, use round, round to -inf or round to
    +inf to make it one. This can also be done if the output needs to be an
    integer.Inside the formula node floor(x), int(x), intrz(x) or ceil(x) can be
    used to make integers.
    I hope this is what you mean... I can't see any problems doing this.
    Regards,
    Wiebe.
    "DrON" wrote in message
    news:506500000008000000E
    [email protected]..
    > I need in Formula Node to assign to the variable value 4000000000!!!
    > What kind of variable it should be???
    >
    > i've just tryed to write unsigned in32, but it does not understand
    > 'unsogned'... But i need variable to be unsigned, because the max
    > value = 4000000000... So, how can i solve this probleme???

  • Help needed with finding node in JTree

    Hi,
    In my application i will be entering some string data in a text box for search criteria.
    When I click on search, I will get data from database which will be shown as a JTree.
    This Jtree will have some nodes in which, node with string entered in the search text box exists.
    I need to focus on this node and I have only a string to find this node.
    How can I do this?How can I find a node in JTree using string value?
    Is there any alternate option by which I can achive my need?
    Please suggest.
    Thanks.

    @OP: please assign your dukes.
    @Andre_Uhres: if you don't get rewarded in the next couple of days, please let me know here to get at least one duke for your effort.
    Bye.

  • Need to Concat Invoice Numbers for a partucular Check Number

    Hi,
    There is a requirement where for a Check Number for example 2345 and there are 4 invoice numbers ABC 1013280,CBD 1013456,DEF 5101234 and XYZ 6101234.
    I joineds ap_checks_all,ap_invoice_payments_all and ap_invoices_all.I want the data to appear as in CONCAT Invoice Numbers for partilcular Check Number
    For example the Check Number 2345 the data should appear as
    CHECK_NUM INVOICE_NUM
    2345 ABC 1013280,CBD 1013456,DEF 5101234,XYZ 6101234
    Any help will be needful for me

    Hi 918308,
    Try:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2196162600402#18313422264397
    Regards,
    Gareth
    http://garethroberts.blogspot.com

  • Need to concat multiple elements into one element

    Hello, here is my challenge:
    Query:
    SELECT  XMLROOT (
            XMLELEMENT ("Inv",
                             XMLAGG (
                                        XMLELEMENT ("Invline",
                                                     XMLELEMENT ( "Category", i.category ),
                                                    XMLELEMENT ( "Amount", i.amount ),
                                         ), VERSION '1.0', STANDALONE YES).EXTRACT ('/*')
      FROM (
            SELECT 1 AS inv_no, 'Labor' AS category, 5 AS amount FROM DUAL
                UNION ALL
            SELECT 1, 'Out-of-Pocket', 10 FROM DUAL
                UNION ALL
            SELECT 1, 'Travel', 20 FROM DUAL
                UNION ALL
            SELECT 1, 'Travel', 2.5 FROM DUAL) i;
    Returns:
    <?xml version="1.0" standalone="yes"?>
    <Inv>
      <Invline>
        <Category>Labor</Category>
        <Amount>5</Amount>
      </Invline>
      <Invline>
        <Category>Out-of-Pocket</Category>
        <Amount>10</Amount>
      </Invline>
      <Invline>
        <Category>Travel</Category>
        <Amount>20</Amount>
      </Invline>
      <Invline>
        <Category>Travel</Category>
        <Amount>2.5</Amount>
      </Invline>
    </Inv>
    Required:
    <?xml version="1.0" standalone="yes"?>
    <Inv>
      <Inv_No>1
        <Details>Labor 5
      Out-of-Pocket 10
      Travel 22.5
      </Details>
      </Inv_no>
    </Inv>
    So I would like help combining the details into one field for transmission to the Mexican Tax Authorities( their spec calls for all  invoice lines to be concated together).
    Note that there are two travel details that need to be summed as well.
    I would prefer to cannot change the query if possible, just using the XML functions.
    Thanks!

    And your db version is?
    From 11.2 and onwards, you can use LISTAGG aggregate function to concatenate character data across rows :
    SELECT XMLElement("Inv"
           , XMLAgg(
               XMLElement("Inv_No"
               , v.inv_no
               , XMLElement("Details"
                 , listagg(v.category || ' ' || to_char(v.amount), chr(10))
                     within group (order by v.category)
    FROM(
        SELECT t.inv_no
             , t.category
             , sum(t.amount) as amount
        FROM (
          SELECT 1 AS inv_no, 'Labor' AS category, 5 AS amount FROM DUAL UNION ALL
          SELECT 1, 'Out-of-Pocket', 10 FROM DUAL           UNION ALL
          SELECT 1, 'Travel', 20 FROM DUAL            UNION ALL
          SELECT 1, 'Travel', 2.5 FROM DUAL
        ) t
        GROUP BY t.inv_no, t.category
    ) v
    GROUP BY v.inv_no ;

  • Need to Set Node Attribute using XPath

    Hi,
    I have an XMLType coloum, I Need to Set/Update/Remove Root Node Attribute using XPath query.
    Regards,
    Rajesh

    Here you go:
           Node nameNode =
                    (Node) XPathFactory.newInstance().newXPath().evaluate(
                            "/root/name", doc, XPathConstants.NODE);
            nameNode.setTextContent("bob");

  • Function Module or Method needed to Convert Nodes?

    When I read hierarchies of nodes, the first parent node can be lets say 3, its children are 2. Old logic the I have expects 0, not three for the parent. I can write some logic to convert all but wondering if their was an SAP FM or method I could use instead.
         Thank-You

    Hi Vishnu,
    Have a look at this FM.
    <b>CO_MP_CREATE_PURCHASE_ORDER</b>
    and also this
    <b>OIO_RS_M_CREATE_PURCHASE_ORDER</b>
    <b>Reward points if this helps,</b>
    Kiran

  • Urgently need help inserting nodes into TreeTable

    Hi, I've got the following problem -
    I use the model that retrieves data from Oracle Database, and it works ok, but when I try to insert new node dynamically, I get very strange reaction of TreeTable and I've been looking where the problem for several hours and I can't find it.
    When I insert the new node I see that the new node is inserted BUT the information in the table doesn't match to the one I've inserted - the node's name is empty and the information in the table just the same as the previous element has.
    I use TreeTable built on the exmple from Sun.
    To notify the TreeTable about changes I use
      public void nodesChanged(){
            TreePath path = treeTableProcess.getTree().getPathForRow(1);
            Object newChild[]= processMonitorModel.newNode();
            int[] ind = new int[newChild.length];
            for (int i=0;i<newChild.length;i++) {
                ind[i] = i;
            processMonitorModel.fireTreeNodesInserted(this,
                                                      path.getPath(),
                                                      ind,
                                                      newChild);
        }I know that TreePath is ok, I checked it out, my node object contains information, the method fireTableDataChanged() get called but the node that I see doesn't contain the information of the node I inserted.
    Thank you in advance!
    Yuri, Germany

    This is the error I get
    Error starting at line 1 in command:
    INSERT INTO PROJECT_CONSULTANT
    (PROJECT_ID, CONSULTANT_ID, ROLL_ON_DATE, ROLL_OFF_DATE, TOTAL_HOURS)
    VALUES
    (1, 100, '06/15/2009', '12/15/2009', 175.00)
    Error report:
    SQL Error: ORA-01843: not a valid month
    01843. 00000 - "not a valid month"
    *Cause:   
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Mapping question - concat two nodes

    hi all,
    i need to map a node with many occurrencies to a node with only one ocurrency, and i need to concat all the values from the source node into the target node.
    example:
    <delivery> 1..unbounded      -->       <data> 0..1
    <delivery> "this is "
    <delivery> "an example"
    result
    <data> "this is an example"
    does anybody know how can i solve this qestion?
    thanks in advanced.
    regards, Fabian

    Hi,
    Go for UDF...
    pass the source data as queue input to the UDF(i.e array)..in that udf loop over the source input and do concat inside the loop and pass the final result to the target element...
    string target = "";
    for(int i =0 ;i<input.length;i++)
    target = target + input<i>;
    if there are multiple contexts in this then need to handle the same
    HTH
    Rajesh

  • In BI report each heirarchy node need to be heighlighted with color or bold

    Hi ,
    I have a report called 'Project overview report' which is displaying data based on WBS Element heirarchy . I need each heirarchy node to be heighlighted with color or bold letters. Can any body help me.
    Regards,
    Jagadesh N

    Hi ,
    I have a report called 'Project overview report' which is displaying data based on WBS Element heirarchy . I need each heirarchy node to be heighlighted with color or bold letters. Can any body help me.
    Regards,
    Jagadesh N

  • I need a "Channel Combiner" node

    I'm currently working through Steve Wright's book, Digital Compositing for Film and Video. He pitches this book as "application agnostic" - meaning you should be able to apply the techniques to most any compositing packages: Shake, AE, Digital Fusion, Nuke, etc. Steve has moved on to using Nuke nowadays but back when this book came out he was using Shake. So, to best play along, I've been using Shake to follow the book. (I had been wanting a Shake refresher anyway, as I haven't played with it in a couple of years.)
    So anyway, there's a section that talks about despilling, or more precisely, in the exercise I'm hung on, UNspilling. I have most of his nodes figured out, except for the end. He's basically suggesting that you break out the individual color channels into separate nodes, perform some operations, then re-assemble the RGB channels into one image again. This last part has me stumped!
    What I need is a node that basically says, "take the Red channel from this image, take the Green channel from this image, and take the Blue channel from this image". I just cannot figure it out. I'm pretty certain all my prior nodes are fine. But this final channel summing node is alluding me. A simple diagram I mocked up might look like this: (Using Mr. Wright's supplied images here.)
    I found this article that makes explicit mention of the magical unspill node tree. In fact, they've included a diagram of their tree. However, it's so small I can't make much out of it.
    Hopefully someone can help me unravel the final piece to this puzzle. I've killed a lot of time trying different combinations of other nodes. All to no avail.
    FWIW, here's a copy/paste of my current script as exists: (minus the actual 'greenscreen.tif' file that I'm using to work through the example.)
    greenscreen = SFileIn("./greenscreen.1-48#.tif",
    "Auto", 0, 0, "v1.1", "0", "");
    blue = ColorX(greenscreen, b, b, b, a, z);
    green = ColorX(greenscreen, g, g, g, a, z);
    red = ColorX(greenscreen, r, r, r, a, z);
    average_RB = Mix(red, blue, 1, 50, "rgba");
    spillmap = ISub(green, average_RB, 1, 100);
    blue2 = ColorX(spillmap, b, b, b, a, z);
    green2 = ColorX(spillmap, g, g, g, a, z);
    red2 = ColorX(spillmap, r, r, r, a, z);
    blue_scale = Lookup(blue2, JSplineV(x,1,0@0,1@1), JSplineV(x,1,0@0,1@1),
    JSplineV(x,1,0@0,[email protected]), JSplineV(x,1,0@0,1@1));
    green_scale = Lookup(green2, JSplineV(x,1,0@0,1@1), JSplineV(x,1,0@0,[email protected]),
    JSplineV(x,1,0@0,1@1), JSplineV(x,1,0@0,1@1));
    red_scale = Lookup(red2, JSplineV(x,1,0@0,[email protected]), JSplineV(x,1,0@0,1@1),
    JSplineV(x,1,0@0,1@1), JSplineV(x,1,0@0,1@1));
    IAdd1 = IAdd(blue_scale, blue, 1, 100);
    IAdd2 = IAdd(red_scale, red, 1, 100);
    ISub3 = ISub(green, green_scale, 1, 100);
    Ignore(blue_scale);
    Ignore(red_scale);
    Ignore(green_scale);
    Hopefully what I'm looking for makes sense to someone out there.

    Patrick,
    I think the general theory is (something like) this:
    The standard despill strategy is to build a green spill map, then subtract that from the green channel to remove the excess green from your shot. This certainly gets rid of some green from the shot, which is the goal. But since green is typically the brightest channel, this process can also darken the shot. Further, it can also introduce some hue shifts.
    The unspill strategy is a similar but different strategy. Instead of subtracting the green you add red & blue. But this only works properly with the scaling node in between the individual channels. Since we're adding some red + blue, we don't want to pull out as much green as before. So we can't use our original spill map at "full strength" on the green channel, like we did with a despill process. The scale_RGB (lookup) node lets us adjust how much each channel contributes to the spillmap before it's final calculations. The addition of the RB channels only works because of the scaling node upstream. We'd scale green down and red/blue up. The exact proportions would depend on the specific shot at hand.
    All in all, I think the despill vs. unspill processes are basically "Six Of One, A Half Dozen Of The Other". Different strategies to go at the same issue: removing spill.
    But because of the scaling lookup node there's a little more adjustability with the unspill method.
    Anyway, the specific scale_RGB values provided in the script-paste above are somewhat arbitrary. In the end, their real utility is twofold: you can use them to limit the green as you add red+blue - in the spillmap. Also they could be used to help "color" any fringing. If you have those tiny (annoying) edges on the key you might try eroding the matte to eliminate them. Not ideal. This scale_RGB node could, alternatively, be used to alter the colors of the fringe so that it mates up with it's background in a cleaner way. Color matching instead of matte eroding.
    Hope that all makes sense. I'm still trying to get my head around most of this stuff...

  • Need help: updating records from a node to another node.

    Hi Gurus,
    I guess most of you would be laughing at me but I'll not from Java background but.
    scenario:
    I have a node (eg. Node A) containing some records, say...with keys A,B,C,D,E.
    I also having anothe node (eg Node B) containing the update records of some of the Keys, eg. A,D,E
    How do I update node A with the updated values of node B.
    a ABAP representation would be:
    LOOP AT NODE_B.
      LOOP AT NODE_A.
        IF NODE_A-KEY = NODE_B-KEY.
          MOVE-CORRESPONDING NODE_B to NODE_A.
          MODIFY NODE_A.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
    thanks.

    Hi Jansen,
    Are you using model node or value? If it is model node you need store in Node B just reference to model class from Node B. If it is value node then you can store keys of elements from Node A moved to Node B in some java Map implementation.
    Best regards, Maksim Rashchynski.

  • I need to add the logic for posting key,

    I need to add the logic for posting key, if posting key = 50 then amount is credit (add negative sign in amount field).
    I creadted this scenario in mapping, We wanted to make sure that the negative sign was placed in the amount field if the posting key was = 50.  So it seems we are good.  We will just need to test.
    How i can test this case?
    Please do needful.
    Thanks in advance.

    Hi,
    You need to use an IfElse node function in your mapping in which the input should be the posting key from the source structure.
    You need to check in the IfElse statement whether the posting key=50, if it is true, then use concat node function to concat the negative sign("-") along with the original value to be passed to the amount field on the target side. Else, if the condition is false(i.e posting key!=50), then simply pass the value to the amount field as it is without adding the negative sign.
    After the mapping is done, go to the test tab and then insert the values in the source fields and then execute from the lower left button showing start transformation.  You need to test with the value of posting key=50 once and with the value not equal to 50 once.In the first case, the output amount field should have the negative sign, which should not be present in the second case.
    You will find your target structure in the righter half of your screen. That's it mate
    Thanks
    Biswajit

  • Passing a node as param

    Hi
    I am trying to send a xml node as a parameter to xsl. The
    scenario is like this.
    i have 2 xml's xml1 & xml2. The xsl needs both the data to act
    upon.
    if i give
    xsl.setParam("temp","//root/display");
    processor.processXSL(xsl,xml1);
    where //root/display is part of xml2. So the xsl is not
    getting the value i want to pass.
    not able to find a way for this. Any help will be appreciated .
    Thank u,
    Regards
    Jayashree

    declare function appendLines($node as node()*) as xs:string {
              if(fn:exists($node)) then
                   if(fn:string-length(fn:normalize-space($node/text())) > 0) then (     
                        fn:concat($node/text(), " ")
                   else (
              else (
    It worked with the above function.

Maybe you are looking for

  • Reading GPS Data from a Bluetooth Receiver

    I have a problem when I connect my mobile to a Bluetooth GPS Receiver using the JSR 82 BTAPI. My mobile is reading the NMEA data from the GPS Receiver and analizes the data. The NMEA data from the GPS Receiver is delivered every second. It works fine

  • Warning MSG :  while Transporting a Request to Production

    <b>Hi Friends,            I got folowing errors while transporting a Request to Production -</b> <b>PART 1 .</b> +++++++++++++++++++++++++++++++++++++++++++++++++    NBA        Quality Assurance               Selection for Import                    

  • How to update front panel immediatel​y with any control change in LabVIEW7.0​?

    I have a lot of controls on the front panel. I want my 3D plot to be updated with any of them changed. Currently only one control's change can result in the update even if I do have done changes on other controls .. that's to say, only one specific c

  • Adobe CS6 Perpetual License - Where can I get this?

    I have been a user of Adobe since CS1.5, I purchased CS5.5 in 2011, and have been using it happily since, recently i have been having problems with CS5.5 and my update to Mavericks OS, so I thought I should buy CS6, problem is at $49.00 per month the

  • HT1933 Anyone having issues when Reporting a purchase ?

    Is anyone else having issues when clicking in Report a problem link it it default back to the main screen? I have 4 unauthorised purchases on my account totalling over $350 and i need this rectified ASAP!