Insert children in the front row?

Hello

I have a 11.2.0.3 database.

I have this request:

WITH my_data AS
       (    SELECT    'test_'
                   || LEVEL
                     AS test_value
              FROM DUAL
        CONNECT BY LEVEL < 5)
SELECT INSERTCHILDXML( SYS_XMLAGG( XMLELEMENT( "Value"
                                             , test_value
                                              )
                                 , xmlformat( 'Test' )
                                  )
                     , '/Test'
                     , 'ShouldBeFirst'
                     , xmltype( '<ShouldBeFirst>how to make this first child of Test?</ShouldBeFirst>' )
                      )
  FROM my_data;

This puts < ShouldBeFirst > as last child (as expected...).

I want to put the child < ShouldBeFirst > as first child < test >. I found INSERTXMLBEFORE here: INSERTXMLBEFORE

But this seems not not at work in my 11.2.0.3 database. My additional tag is missing completely:

  WITH my_data AS
       (    SELECT    'test_'
                   || LEVEL
                     AS test_value
              FROM DUAL
        CONNECT BY LEVEL < 5)
SELECT INSERTXMLBEFORE( SYS_XMLAGG( XMLELEMENT( "Value"
                                             , test_value
                                              )
                                 , xmlformat( 'Test' )
                                  )
                     , '/Test/Value[1]'
                     , 'ShouldBeFirst'
                     , xmltype( '<ShouldBeFirst>how to make this first child of Test?</ShouldBeFirst>' )
                      )
  FROM my_data

How can I put the additional tag as first child?

Good bye

DPT

Hello

This isn't the syntax of INSERTXMLBEFORE.

Look to the doc once again, there are only 3 required parameters:

SQL > WITH my_data LIKE)

2. SELECT "test_". level of test_value

3 DOUBLE

4. CONNECT BY level<>

5)

6. SELECT xmlserialize (document

(7 insertxmlbefore)

8 xmlelement ('Test', xmlagg (xmlelement ("value", test_value)))

9, "/ test/value [1].

10, xmltype ('How to do this first Test child?')

11           )

12 dash

13         )

14 FROM my_data;

XMLSERIALIZE (DOCUMENTINSERTXML

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

How to make this first child of Test?

test_1

test_2

test_3

test_4

Since you're on 11.2.0.3, you can also use the XQuery Update that replaces now all the previous functions of Oracle XML DML.

Tags: Database

Similar Questions

  • OFA: how to insert values from the front end of the OPS to the database page

    Hi friends, I am new OAF, iam using jdeveloper version 9.0.3.5

    I created a QueryPG .in this page I HAV set a "create" button on this page when I click that "create" button must navigate to another page (ie) createPersonPG, I have hepatitis has created this createPersonPG in a RegionStyle of = > defaultsinglecolumn, with some of my attribute as "personId, phoneno, e-mail, address" in my createPersonPG I hav also set a button titled "save"...»»» " After you enter the data when I click on save button means a new line should be added to my database table that was my task... for which I wrote the code in my MainCO

    Successful work means:
    --------------------------------------
    I can able to query the data from the database
    From my QyeryPG, I can access createPersonPG

    MY PROBLEM
    -------------------
    When I enter values in the createPersonPG wen I click on "Save" button means that the data that I enter are not save to database, but in my QueryPG I get confirmation that saved successfully in my QueryPG. " I want data to be saved in the database... when I get select * from table_name average, should be a rank more

    can anyone help me with this task please I'll be greateful to you.. _ I was doing this job for more than 20 days Please helpme I complete this task

    Thank you
    Thilib

    my code for in MainCO

    in LICS I HAV written query command and navigate to the code "createPersonPG" like this:

    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processFormRequest (pageContext, webBean);
    String actionInMainProgramScreen = pageContext.getParameter (EVENT_PARAM);
    String personId = pageContext.getParameter ("PersonId");
    If (pageContext.getParameter ("GO")! = null)
    {
    System.out.println ("Submit button");
    OAQueryUtils.checkSelectiveSearchCriteria (pageContext, webBean);
    String firstName = pageContext.getParameter ("FirstName");
    String phoneNO = pageContext.getParameter ("PhoneNO");
    [Serializable] parameters = {personId, firstName, phoneNO};
    System.out.println ("AM method is called");
    OAApplicationModule am = pageContext.getApplicationModule (webBean);
    am.invokeMethod ("initQuery", parameters);
    }


    If (actionInMainProgramScreen.equals ("Create"))
    {
    System.out.println ("create key");
    () pageContext.setForwardURL
    'OA.jsp?page=/gwp/oracle/apps/xxi/aaaPersonDetails/webui/createPersonPG '.
    null
    OAWebBeanConstants.KEEP_MENU_CONTEXT
    null
    null
    true
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES
    OAWebBeanConstants.IGNORE_MESSAGES);
    }
    }------------------------------------------------------------------------------
    IN MY createPersonCO I HAV wrote this code

    ' Public Sub processRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processRequest (pageContext, webBean);
    String paramPersonAction = pageContext.getParameter ("xxParamActionOnPerson");
    OAApplicationModule am = pageContext.getApplicationModule (webBean);
    PersonParamList serializable [] = {paramPersonAction};

    If (paramPersonAction! = null & & paramPersonAction.equals ("Create"))
    {
    am.invokeMethod ("createPerson");
    }
    }

    /**
    * How to manage remittances form for form elements in
    * a region.
    @param pageContext OA page context
    @param webBean the grain of web for the region
    */

    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processFormRequest (pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule (webBean);

    If (pageContext.getParameter ('Save')! = null)
    {
    System.out.println ("first line button Save");
    am.invokeMethod ("saveProgramToDatabase");
    System.out.println ("navigate to home page');
    String message = "saved successfully ';
    OAException exp = new OAException (message, OAException.CONFIRMATION);
    pageContext.putDialogMessage (exp);
    () pageContext.forwardImmediately
    'OA.jsp?page=/gwp/oracle/apps/xxi/aaaPersonDetails/webui/aaaPersonDetailsMainPG '.
    null
    OAWebBeanConstants.KEEP_MENU_CONTEXT
    null
    null
    true
    ADD_BREAD_CRUMB_YES);
    }
    }-------------------------------------------------------
    IN my AM I wrote this code

    ' public void initQuery (String personId, String firstName, String phoneNo)
    {
    System.out.println ("Am initQuery");
    aaaPersonDetailsVOImpl vo = (aaaPersonDetailsVOImpl) getaaaPersonDetailsVO1 ();
    System.out.println ("aaaPersonDetailsVO initQuery method called");
    vo.initQuery (personId, firstName, phoneNo);
    }

    Public Sub createPerson()
    {
    System.out.println ("first createPersonMethod line");
    aaaPersonDetailsVOImpl vo = (aaaPersonDetailsVOImpl) getaaaPersonDetailsVO1 ();
    System.out.println ("Line before if condition createPersonMethod");
    If (!) VO.isPreparedForExecution ())
    {
    System.out.println ("first line If condition createPersonMethod");
    vo.setMaxFetchSize (0);
    }
    System.out.println ("creating New Row");
    Line r = vo.createRow ();
    System.out.println ("new insertion line");
    vo.insertRow (r);
    System.out.println ("inserted row");
    r.setNewRowState (r.STATUS_INITIALIZED);
    System.out.println ("before"sequence initialized");
    Number personId = this.getOADBTransaction () .getSequenceValue "(XXI. PER_DETAIL");
    System.out.println ("after"sequence initialized");
    vo.getCurrentRow () .setAttribute ("Person_Id", personId);
    System.out.println ("sequence number =" + personId);
    System.out.println ("last line of the Create method");
    }

    Public Sub saveProgramToDatabase()
    {

    System.out.println ("before validation.");
    getOADBTransaction () .commit ();
    System.out.println ("new program created.");
    }

    Published by: user13307444 on July 26, 2010 10:20

    Hello

    This could be the problem if there is that data validation is there that does not back up the data on the page. Because for example I had this problem when my database column has been primary key while on the EO page it wasn't. & When I tried to record data EO was allowing me to record, but the database did not allow. Please check your OA

    AJ

  • Disable "insert the front element / remove item ' in the table

    Hello guys.

    It is possible to deacitvate function "insert the front element / delete" appears after right-clicking on a table in the front?

    "Description and trick" should stay.

    Thank you.

    Alex

    You can customize the context menu to remove elements of the request and keep others:

    Click on the table (and not on the array element!) in the Panel and select Advanced-> Menu contextual Run - Time-> Edit...

    This brings the context Menu Editor:

    Change the control drop-down menu of "Default" to "Custom".

    Select it "?" line in the tree on the left control.

    on the right, change the element Type of the "user position" «Application point-> Description and Tip...» »

    It automatically fills the corrent name and the tag.

    Save the rtm either in a file or in the control.

    LV will automatically manage elements of the application in the control, any necessary events.

    I sometimes find the function "Menu copies" of the context menu very useful if I want to just disable some elements.

    http://zone.NI.com/reference/en-XX/help/371361G-01/lvconcepts/customizing_vis/#Customizing_Menus

  • Inserted row is the same as the deleted row

    Hello

    I have another weird behavior with ADF I don't understand... When I delete a line in an af:table and then I insert a line, the insert row is identical to the deleted row. Here is what I do

    1. Go to the page, the table is loaded with a record from the database
    2. Remove the line, using a button that triggers the delete of the iterator method in links
    3. Insert a new line using a method defined in the Application module implementation java class. He defines himself as a methodAction in links
      1. The insert in my interface button calls a method in my java bean

    public void insertNewVariableScheduleRow(ActionEvent ae) {
            insertNewVariableScheduleRow((DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry());   
    }
    
    private Row insertNewVariableScheduleRow(DCBindingContainer bindings) {
            OperationBinding        method = bindings.getOperationBinding("insertNewVariableScheduleRow");          
            Map                     paramsMap;
            Row                     newRow;
    
            paramsMap = method.getParamsMap();  
            paramsMap.put("defaultValues", scheduleDefaultValues.toArray());
            method.execute();
            
            logger.log("(method.getErrors().size(): " +(method.getErrors().size()));
            
            newRow = (Row)method.getResult();
            
            return newRow;
    }
    

    The method in the * class AMImpl do:

    public Row insertNewVariableScheduleRow(int scheduleNo, int scheduleVersion, String declId, String[] defaultValues) {
            ViewObject  vo          = this.getDeclSchedCellUpdView();
            int         displOrder  = getVariableScheduleNextDisplayOrder();
            Row         row         = vo.createRow();
            
            row.setAttribute("DisplOrder",  displOrder);        
            row.setAttribute("DeclId",      declId +"");
            row.setAttribute("SchedVrsnNo", scheduleVersion +"");
            row.setAttribute("ScheduleNo",  scheduleNo +"");
            
            for(int i=0; i<defaultValues.length; i++) {
                    if(defaultValues[i] != null) {
                            row.setAttribute("Col" +String.format("%03d", i+1) +"Value", defaultValues[i]);
                    }
            }
    
            vo.insertRow(row);
            
            return row;
    }
    

    I use JDev 11.1.1.7

    Thank you for all your help

    What is property changeEventPolicy on the iterator parameters in your pageDef? (try to define this 'None')

    In addition, you can try to run the managed bean delete operation and then reset the State of the component with:

    RicheTableau yourTable =...

    yourTable.resetStampState ();

    AdfFacesContext.getCurrentInstance () .addPartialTarget (yourTable);

    Dario

  • How can I insert a jpeg image in the front panel

    Hello

    I'm new to labview and have written a vi using a data logger NI USB-6008 reading from a sensor that performs a calculation and then displays a value. I am trying to put the logo of our company on the front screen when running, but can't work out how to do it. The logo is a jpeg file.

    I use the trial version 2010.

    Thank you

    Andy

    Hello

    Drag / move your jpeg file from windows Explorer to the front panel of your VI should work.

    Hope this helps

  • Cannot perform the insert/update on the form of tables, due to the dynamic action

    Hi all

    I created a dynamic action that calculates multiple cells in a table.

    This feature works well, when I change the value of the associated cell then the computed value is changed by the dynamic action.

    But I am not able to insert or update the line in a table when the dynamic action is enabled. When I put the condition 'Never', then the line is inserted or updated without any problems.

    All guess where is the problem?

    Apex version: 4.1.1.00.23

    Jiri

    Nina wrote:

    I don't know why the 123,40 value (or other) is set to the next item in line (f09, fsc, etc.)
    >

    What is hidden and generated Apex elements are always included in the last cell (td) of the line. Thus, it has nothing to do with the next item, only the last cell.
    If you see the last cell of the 888 Page you will see probably the same type = "hidden" entries here also.

    Your problem is not related to the HTML fragment to the last cell in the row showing all those extra items, it's somewhere else.

    Oh, here comes the jQuery selector:

    var clickedRow = $(this.triggeringElement).closest('tr');
    
    $(clickedRow).children('td[headers="SAL"]').find("input").val(myCalculatedTotal);
    

    SAL, COMM, w/e. here you will find the TD with headers = "COMM" and all the input fields and the value of all the entries in total calculated. Your selection is not precise enough in this case.
    So, target the specific entry.
    With the code example:

    
    
    
    
    
    
    
    
    

    change the switch on

    $(clickedRow).children('td[headers="SAL"]').find('input[name="f08"]').val(myCalculatedTotal);
    
  • API to insert values into the table of apps

    Hello

    I created a table with front end applications. Creating columns and rows. Now, I want to insert values in different columns of the corresponding lines.
    Can you get it someone please let me know the API that I can use here to insert the column values?

    Kind regards!

    If you want to insert data in the standard table oracle, then you must use the api instead, then apply the insert statement, this api oracle used to check the validation of the company etc.

    Regarding the concern with regard to insert the date as you said, this is why you should use this api 'PAY_USER_COLUMN_INSTANCE_API' to insert data in pl/sql script.

  • HP EliteDesk 800 G2 Small Form: The front panel audio connector - this only made type to use for headphones and microphone

    Hello

    I am trying to determine what type of audio 3.5 mm plug to put into the connector on the front panel for the use of a headset to make video communications.

    could be - sleeve, ring and end cap (mono audio and microphone)

    or

    could be - sleeve, ring, ring and tip (stereo sound and microphone)

    Having read through the manuals and nothing is said on the type to use.

    Hello world

    Just plugged the connector 4 poles on my headset combination for my mobile phone (cellular) and the box of pop - up asked me to select headset or microphone - no selection for both.

    Looks like the right sleeve is for headphones only, and the left one is for headphones or micro - selectable by the user and not the two on a single sheet.

    Everything explained by the practice - but not the paperwork in the manuals.

    #5 for microphone or headset - menu popup is displayed after you insert a 3.5 mm plug to select that one but not both at the same time.  (So I can't use my headset to phone)

    Thank you

    Son

  • Satellite Pro M30: buttons on the front don't do media control

    Buttons on the front does nothing when the machine (satellite Pro M30) is disabled or order the multimedia. Is there something I need to do to configure, or is it a hardware failure?

    Hugo

    Hello
    to perform the General music in "offline" mode, I pushed and hold down the Mode button until the blue LED on the CD symbol lit up on the front.
    After that I inserted a music CD, and portable he played very well in "offline" mode

    But this time I had to study the manual actually.

  • Difficulty the front Dimension of the array, but allow the user to change the size of the array

    Hello

    I know there are a few other posts on table and scroll bars but mine is a little different. I want to have the physical size of the fixed table control and allow the user to change the size of the array as required and a scroll bar if the number of elements exceeds the specified physical dimension. I wouldn't mind if, at the end of the scroll bar, the user sees an uninitialized element.

    Thank you very much

    Hello

    The problem I have with the property Num Row node is it seems to replace the scroll bar. Whenever I try to change the line number, the table automatically resizes its physical size on the front and the scroll bar has no effect.

    However, I solved the problem by taking row completely digital. I just said if the table size is > to a constant value (i.e. 3), add a scroll bar and my front panel dashboard to be a size larger than what the value of this constant is size. Once I begin to add values in sequential order and I get to the fourth value, the scroll bar is added and the scroll bar has a feature where it adds an element of null for you, so if I fill this null element I just increased the size of the table and another null element appears underneath.

    Thanks for the help

  • Invert the table to the Add element to the front of the performance of Bay

    Hi all

    I read in a few places that reverse an array to add the element to the front of it will give the best performance since no new allocation of memory is necessary.

    I have 2 questions about this process:

    1. "reverse a table on requires pointers change.»

    Is that mean that a table in Labview is like a linked list? who has pointers that point to the next element.

    So when this inverse process occurs, the head of the linked list will be the last element of the array, and all links in the linked list will require a change.

    Step 1: table of moose with one extra space at the end

    Step 2: Matrix inverse

    Step 3: Add a new item at the end of the table opposite

    Step 4: Reverse again.

    2. the exercise of reverse Add then reverse is even worse in fact. Why is this?

    "Overhead" is the need for new buffer allocations, which indireclly affects runtime but also memory.

    Yes, often the paintings have an additional memory beyond the end of the table to avoid the resizing with each adding an item...

    Your FAQ quotes says nothing about any reversal trick. To do this, the elements of the array need reverse look up, then inserted using the space soft (if it exists!), then the need even to reverse ber alements in place. Seems like a lot of work to do over and over again. Yes, it might be slightly more efficient that have to be allocated to each prefix operation but we do not really know what the compiler does. Maybe if soft is available, it would be to move all the items up and insert the element first, make a new allowance that occasionally necessary. Who knows? I have the greatest respect for Darren, the author of the "source". Perhaps he can clarify what he writes.

    Benchmarking valid what is quite difficult.

    In all cases, you often know the final size, so it can be distributed in one shot and the items replaced with valid data that you will. It's always orders if magnutide more effective than any other solution.  If you need to grow an element of a table at a time, add at the end, never at the begginning.

  • Best way to update the individual rows of a Table?

    I took a quick glance at a few examples, but did not get a clarification on this.  I am looking to have something close to a listbox control or the table to where I can update just one column of values to line a 1 time per second pace.  I'm looking to display our acquisition of data values in a table or a listbox control.  The single list box seemed to work well for that, but I couldn't use the row headers to list the names of channel beside the channel values.  I thought to link the values of cursor in two areas of list to do this, but did not find any info on it for the single list box.

    I have a few questions:

    (1) I have a 1 d table to where I want to use this data to constantly update the first column (with a multitude of lines) of a table.  I'm looking for the best route to not take too much time for treatment by doing this.

    What is the best way to update the individual rows of a table?   Invoke the node "Value of the cell value"... or is there another method?

    (2) why is that, after each iteration else, row values are deleted?

    Also, for adding additional channels originally arrray... it is better to use the 'Array' subset then the function "Construct the table" or function "Subset of the table" and "insert table"?

    See the attached example.

    Thank you.

    Jeff· Þ· Bohrer says:

    (2) why is that, after each iteration else, row values are deleted?

    Classic race condition.  dump the loop and node-p and just wire the 2D table on the terminal Board. !

    I don't see the race condition.  What I see is the table once the last element has been written for it all run the oil.  I saw looked it with point culminating performance on.

    But I agree entirely with writing to the Terminal.  It is a 1 d array, so you will need to use an array of generation and convert a 2D array in order so that he could write correctly.

  • Is it possible to call a .exe (non-LabVIEW, such as Notepad) in a child windown on the front panel?

    I would like to launch a stand-alone .exe inside the front of my VI.  It is a piece of software by the provider of a sensor that I try to incorporate in my VI.  I was able to find how to call the .exe using the .NET constructor and invoke nodes.  However, the application opens in its own window.  Is there a way to run from a child window within the façade (ideally, within a tab on the front panel control)?

    I'm in LabVIEW 8.6.

    Thank you.

    smercurio_fc wrote:
    I don't think that it actually works. My understanding is limited about this feature, but since I read it only works with the pop-up windows and windows that are already children. The application's main window is not a child window.

    I've done it before.  I have attached a simple example using Notepad.  Make sure that the notebook is already open no open files.  Since the example is not the position of the child window, the position relative to the window will be the same, because it is off the desk.  So, make sure the upper left corner of the Notepad is close to the origin of the desktop computer.

  • Numbering of the headings in the Tables on the front lines

    I ran across an example that has a Table on the front and the first column is the row header (you have the possibility to make visible) it was numbered 0-127, and 128 data points created using certain graphics signals of functions there.  How do you get the first column (row header - is added to the Table on front panel if you do the visible row header?  I don't think that someone was sitting there and entered 0-127 off the coast of the façade.

    In addition, on the graphs, which, by default, have a black background - how can you change the color of the background?  I can change the color of the trace, but failed to change the background color.

    Thank you

    Lines and columns headers can be written programmatically by using nodes of property:

    For the background of the chart you can simply use the color tool in the tool palette. Just select the tool, right-click on an area that is in the background and select the color you want in the popup window.

  • all of a sudden... my computer does not see the things I plug into the usb ports on the front of the computer...?

    all of a sudden... my computer does not see the things I plug into the usb ports on the front of the computer...?

    If I shut down the computer and plug... he sees the thing then turned back...
    I can not just plug in while the computer is turned on... once again he has used to do this just as well... for some reason any, he sees things now.
    any thoughts?

    Hi KK Waddell.

    Thanks for posting in the Microsoft Community.

    I understand that you face the issue with the USB port does not work when you embedded on the front of the computer.

    Before you start the troubleshooting steps, I need the information required.

    1 did you changes to the computer?

    2 did you receive an error message?

    I suggest you to check with the other USB port.

    I suggest you to see the links and check.

    USB port may stop working after you remove or insert a USB device

    http://support.Microsoft.com/kb/817900

    Advanced troubleshooting tips for General USB for Windows XP problems

    http://support.Microsoft.com/kb/310575

    One or more USB devices may not work when you start your Windows XP-based computer

    http://support.Microsoft.com/?kbid=885624

    See also:

    Hardware devices do not work or are not detected in Windows

    http://support.Microsoft.com/mats/hardware_device_problems/

Maybe you are looking for