Update multiply nodes on the XMLType field

Hi all.
I have this table

+ 'DOCUMENT ' +.
+(+
+ 'ID' NUMBER ENABLE NOT NULL, +.
+ 'ID_ARCHIVE' ENABLE NUMBER NOT NULL, +.
+ VARCHAR2 (20 BYTE) "USERNAME," +
+ DATE 'CREATION_DATE ', +.
+ DATE "LAST_UPDATE" +
+ VARCHAR2 (20 BYTE) "LAST_USERNAME," +
+ NUMBER OF 'VISIBLE ', +.
+ VARCHAR2 (20 BYTE) 'STATE ', +.
+ 'XML' 'SYS '. ("' XMLTYPE ',) +.


It is an example of XML value:


<? XML version = "1.0" encoding = "UTF-8"? >
< root >
< fields >
< field fieldId = "text_141536485" = "true" type iterable = specifications 'text' = name of the 'simple' = value 'tiolo"="1"required ="false"status = 'ok' searchable ="true"="true"isIterate ="false"isField / > < field fieldId ="comp_1235813718"iterable ="true"type ="composite"specification ="composite"status = 'ok' searchable ="true"="true"isIterate ="false"isField >
< fields >
< field fieldId = "texte_-1661573009" iterables = "true" type = specifications 'text' = name of the 'simple' = 'New' value = "1" required = "false" status = 'ok' searchable = "true" = "true" isIterate = "false" isField / >»»
< field fieldId = "texte_-1661573009" iterables = "true" type = specifications 'text' = name of the 'simple' = 'New' value = "2" required = "false" status = 'ok' searchable = "true" = "true" isIterate = "true" isField / >»»
< / fields >
< / field >
< field fieldId = "comp_1235813718" = "false" isIterate = "true" type iterables = 'default' specification = 'default' status = 'ok' isField = "true" >
< fields / >
< / field >
< / fields >
< / root >


I'd like to update the attribute name of all fields of Pentecost fieldId = "texte_-1661573009", that is to say, "meter".

I have try this query:

SELECT d.XML.extract('//field') in DOCUMENT d
* where d.XML.existsNode ('/ / field [@fieldId = "texte_-1661573009"]') = 1; *


It returns all fields with fieldId = "texte_-1661573009".

The update:

update the document overall. OBJECT_VALUE = d.XML.updateXML(OBJECT_VALUE,'//field/@fieldId','Counter')
* where d.XML.existsNode (OBJECT_VALUE,'/ / field [@fieldId = "texte_-1661573009"]') = 1; *


I get this error:

SQL error: ORA-00904: "OBJECT_VALUE": invalid identifier
* 00904. 00000 - "% s: invalid identifier."

Could someone help me find the error?

Thank you very much!

Cristian

Hello

I have try this query:

SELECT d.XML.extract('//field') in DOCUMENT d
* where d.XML.existsNode ('/ / field [@fieldId = "texte_-1661573009"]') = 1; *

It returns all fields with fieldId = "texte_-1661573009".

In fact, it returns all the fields of a document where there is at least one field with fieldId "texte_-1661573009".
It will make a difference with updateXML, because it does not update the nodes you expect.

I get this error:

SQL error: ORA-00904: "OBJECT_VALUE": invalid identifier
00904, 00000 - '% s: invalid identifier '.

OBJECT_VALUE is only used to refer to the column of a table of Type Object, such as an XMLType table.
Here, you're dealing with an ordinary table, so use the appropriate column name, that is to say "XML".

Do you want to:

UPDATE document d
SET d.xml = updateXML( d.xml,
                       '//field[@fieldId="text_-1661573009"]/@name',
                       'Counter' )
WHERE d.xml.existsNode('//field[@fieldId="text_-1661573009"]') = 1
;

?

Tags: Oracle Development

Similar Questions

  • server side script, update a node in the collection of the 3rd party db

    Hi all, someone had hopefully create/update a node from the collection of a side script server?  I managed with a script server-side, but I'm looking for a way to get a node from the collection with a cron job, or similar.  Can help? Thank you, Doug

    A little bird told me that there is a new SDK out there with support server side for things like createNode, publishItem, etc.

  • calculate the amount of nodes in the XMLTYPE column

    I'm in ORACLE 10 g 10.2.0.4.0

    There is a table BOOK)
    ID NUMBER (10.0).
    XML_COLUMN XMLTYPE)

    XML_COLUMN looks like

    < Book bookCode = Classtest "ae1" = "0" title = "MasteringChemistry for 1st Averill/Eldredge" >
    < description / >
    < sectionTierLabels >
    < sectionTier label = "Left" >
    < sectionTier label = "Chapter1" >
    < sectionTier label = "Chapter 2" >
    .
    .
    .
    < sectionTier label = "Section" / >
    < / sectionTier >
    < / sectionTier >
    < / sectionTierLabels >
    < / book >

    Different records has a different number of chapters.

    I should get a result like

    Label sectionTier BOOKID
    1234 1 part
    1234 2 Chapter 1
    1234 3 Chapter 2
    1234 section 4
    1111 1 part
    1111 2 Chapter 1
    1111 3 Chapter 2
    4 1111 Chapter 3
    1111 section 5

    No idea how to do it?

    Thank you
    Julia

    Published by: 795070 on Sep 17, 2010 11:33

    Published by: 795070 on Sep 17, 2010 11:49

    Published by: 795070 on Sep 17, 2010 12:08

    Hello

    Strange structure for your XML data, are really nested elements sectionTier or is it a mistake?
    If the first case, try the following:

    SELECT b.bookid, x.*
    FROM book b,
         XMLTable(
          '/book/sectionTierLabels//sectionTier'
          passing b.xml_column
          columns
           sectionTier for ordinality,
           label       varchar2(30) path '@label'
         ) x
    ;
    
  • I did the most recent iOS 10 updated, just heard on the news that Yahoo has been hacked.  I changed my Yahoo email but can't find the field to change on my devices.  It is simply not there, what is happening?

    I did the most recent iOS 10 updated, just heard on the news that Yahoo has been hacked.  I changed my password to Yahoo mail but can't find the field to change the password on my devices.  It is simply not there, what is happening?

    For some reason any change automatically if change you it online. Today, I changed my password through my office and I went to change the mail and she had already changed.

    You can try to delete your account your unit off and add it again.

  • Windows 7 ultimate has received 29 updates today, now when the user icon, click on do not see the field of password for sign on

    Windows 7 ultimate has received 29 updates today, now when the user icon, click on do not see the field of password for sign on

    Hi Richard,

    Thanks for posting your query on the Microsoft Community.

    Thank you for details on the issue and we are happy to help you.

    I suggest to refer to the following article from Microsoft regarding Solutions to problems with the Windows logon and check if it helps.

    http://Windows.Microsoft.com/en-us/Windows7/solutions-to-common-problems-with-logging-on-to-Windows

    Please let us know if you need help with Windows. We are happy to help you.

    Thank you.

  • Better implementation of a callback method to update the various fields?

    Hey everybody,

    I'm developing an application that uses the Google Translate API.  I set it up so that a user can specify a language before you do, and then once they connect, I have wrappers around each piece of text displayed on the screen which will result by the text based on the language selected.

    My problem is that several things must be brought on a given screen.  Therefore, I need to access Google Translate API several times per screen.  To do this, I opened a HTTPConnection on a new thread.  So I turn my screen Interface to the translator class, and then the translator class call my callback methods for the screen (requestSucceeded() or requestFailed()).

    Now, let's say that I have translated the title of the screen and the screen text.  These are two separate HTTPConnections.  So, when the title is translated, I want my requestSucceeded() setText method on my LabelField title.  When the body of the text is translated, I want my requestSucceeded() setText method on my body LabelField.

    What is the best way to have my requestSucceeded() method to differentiate the various fields to be updated?  Currently, I'm passing to the translator two things (via a string [] array): the text to be translated and a 'cookie', which describes the element being translated.  I then use if statements in my callback requestSucceeded() Update method the appropriate field based on the 'cookie' (which the translator will send in return and the text translated).

    I feel like there must be a better way to do this. Does anyone have any suggestions?

    Thank you!

    I don't know I understand your question, but it seems that this is to decouple the the task of translation of background of the user interface element that is being translated. You're already halfway to decouple the background translator of the mechanism that updates the user interface. What you seem to be missing is a nice way to specify the target of the translation without writing a lot of switch / if statements.

    Instead of having a translation callback object that serves several UI elements, you could create a reminder for each UI element. The reminders will always implement the same interface, so the task of the translator background will be not supported. For example, the interface could be something in the sense of:

    interface TranslationCallback {
      void translationCompleted(String translation);
      void translationFailed(Throwable cause);
    }
    

    Your user interface would then create a callback object that encapsulates a user interface element (for example, a text field) and implements the TranslationCallback above. Inside of the translationCompleted and the translationFailed logic will not need to understand which element to update, because the reminder is associated with a particular item in a particular category, for example, TextField.

  • Customization form of Oracle EBS - R12 - allow the update in the quantity field

    Hi friends,

    I have a requirement:

    1. do not leave the update in the quantity field.

    2. when the user click on save or go to another field, a message pop up «Unauthorized update» here

    Well, I tried 'WHEN to VALIDATE the POINT'

    -This will not be suitable for my requirement because the quantity field is in all tabs, pricing, delivery, address, return, service and other tabs quantity field.

    so I use 'ONCE VALIDATE RECORD' it's ok now.

    so please help me

    -How to find if a field (in my case its quantity (quantity in pricing, delivery, addresses, Returns, service and other tabs)). is changed or not.

    -for the record, we should pop up the message and bring back the amount of OLD back on the field.

    I don't know how to bring the amount of old to the rating.

    Help, please

    AT

    PL continue the discussion in your original post - Disable (= unauthorized update) the field ordered_quantity in Oracle Apps R12 using FP

  • It is possible to compare the contact fields based on the value of data updated?

    Hi all -

    I would like to run a filter and compare my contact fields if the value in a field has been updated or changed.

    for example if the data in the "first name" value changes to be empty to have a value, which would respect the requirement.  Also if "phone number" 123-456-7890 to 999-000-0000 that would also meet the requirement.

    Did anyone done this before?  Any ideas of how to implement?

    Any contribution is appreciated.  Thank you!

    If that's what you're talking about, there is no trace of audit in Eloqua.

    It will be great if Oracle can verify the critical fields.

    The solution is to create to the top of the field in another area, so when it changes, you can compare the values.

    Good luck

  • Update of the custom with the API fields

    Hi, (I am currently a place specifically to work on this, so I'd appreciate an urgent response.)

    Unless I missed something - there seems to be no document saying how to upgrade something else than the default fields? I use the RESTful API and could quickly recover contacts. The update Gets a 200 response - but how we update the custom fields?


    Here is a sample code... my guess to send just the name "internal" (line 3) does * not * work.


    $contact-> id = $id;

    $contact-> emailAddress = $lead1 ["emailAddress"];

    $contact->C_Accept_or_Reject_Date1 = time();

    $response = $eloquaRequest-> put ("data/contact /'. ') ($id, $contact);



    Update: I also tried the inner statement without success:

    $contact-> {'{{Contact.Field (C_Accept_or_Reject_Date1)}}"} = time();



    Thanks in advance,

    Sam

    Hi Sam,

    You'll want to see custom fields using their identifier unique and include them as part of a collection fieldValues can only be in your application. See the following example:

    'type': 'Contact,'

    'currentStatus': 'Action pending ',.

    'name': '[email protected]',.

    "accountName": "Eloqua, Inc..

    "address1": "111 Peter Street",

    "country':"Canada. "

    'emailAddress': '[email protected]',.

    'fieldValues can only be':]

    {

    "id': '100021."

    'value': 'value of the custom field.

    },

    ....

    Note that the fieldValues collection can only be contains a record for each custom and its corresponding value field. To search and retrieve the ID unique for your custom fields, you can use the following parameter:

    • GET (list): / assets/contact/fields? Search = {searchTerm} & page = {page} count = {number} & orderBy = {orderBy}

    We also have a post on to access the Contact fields that should help you.

    Please let me know if you need more information.

    Thank you

    Fred

  • the form of course update the user field value

    Can experts tell me if we can retrieve the data from the form of courses and update the user field. If so, please could you tell me how to do and a simple example will be useful.

    Thank you very much

    Write an adapter to transfer and pass the value of the form attribute of the user

    How to create a transfer adapter: -.

    Name of the adapter:-adapter task of transfer process
    Adapter type:-treat stains
    Description:-adapter task of transfer process
    Variable:-determination of entry (of Type String) during execution
    Task of the adapter:-logical task... Adapter--> Variable defined return value--> entry
    Save... Build... Compile...
    For example, you have created your adapter generic transfer...

    Suppose that your Mobile is stored in the field of process form Mobile...

    In the process definition, create a task... Set the task to transfer adapter process...

    entry--> process Date--> Mobile
    Return value of--> user definition adapter--> Mobile...

    It is a very convenient way of transmission data Mobile Process to user profile without writing any custom code

    Mark if you find it useful, useful...

  • Update values dynamically in an attribute of the user who is the search field

    Hi all

    Can I have a pre process handler to update the values in the search field on my userpage to create? I have two user attributes: one is the default organization and the other is a country created by the user attribute. These two are lookup fields. I want to update the field of research by checking what is selected in the search field organization. Is this possible in IOM?

    Not sure if the process pre event handler is the way to go, but that's what I want to achieve. Can anyone guide me regarding the same?

    Thank you
    $id

    OK, here's my shot at a walkthrough... Let me know if I missed any steps.

    1. from your original post, you use two search boxes. I'm using a basic VM test, so I need to create two. I went with the city and State (I know they are OOB, but this is just an example).
    -Created Lookup.Custom.City and Lookup.Custom.State samples:
    Lookup.Custom.City
    Code key-Decode
    Miami-Florida
    Orlando-Florida
    New Orleans and Louisiana

    Lookup.Custom.State
    Code key-Decode
    Florida-Florida
    Lousiana-Louisiana

    -Creation of custom attributes UDF: Advanced-> user-> Actions Configuration-> the attributes of the user (LOV)
    -City Office and the State Office

    2 use weblogicExportMetadata.sh to export /metadata/iam-features-requestactions/model-data/CreateUserDataSet.xml

    3. change the CreateUserDataSet.xml to add:

    
    
    
    
    

    4. use weblogicImportMetadata.sh to import CreateUserDataSet.xml

    5 run. / PurgeCache ALL (same directory)

    6. go on request - create user (this example is for the provision of the basic application)

    7. If everything went well, when you select State, say Florida, then when you click on the search for the city, you will see Orlando and Miami. If you toggle the State of Louisiana, you will need to click on search again on the city and New Orleans should be the one that is displayed.

  • Interface - value in the target field change on insert/update

    Hello

    For an interface, I use the module knowledge - incremental update of the IKM Oracle.

    He is running in insert / update of fashion.

    In the target of the interface table, there is a the target field (column) that I want to give a value based on exploitation.

    If the file is new and inserted into the target table - the field in the record should get the value "INSERT".

    -Similarly, if an existing record in the target table is updated - the field of the record should get the value "UPDATE".

    Any ideas on how you can do it?

    Thank you.

    You just need to customize your KM. Its can be done in many ways. Here is one approach.
    Change the existing lines of your update. Then change as below. But make you your own customization without hard coding.
    Here is codes, the fraction of the total code used in the KM steps.

    ){"?>(
         <%=odiRef.getColList("", "T.[COL_NAME]", ",\n\t", "", "((UPD AND (NOT UK) AND (NOT TRG)) AND REW)")%>
    *, COL_FLAG. *
    ) =
    (
    Select < %="odiRef.getColList" ("«,="" « s.="" [column] », »,="" \n\t\t\t »,="" « »,="" « ((upd="" et="" (pas="" uk)="" et="" (pas="" trg))="" et="" rew) »)="" %=""> *, "UPDATE."
    of< %="odiRef.getTable" ("l",="" "int_name",="" "w")="" %="" >="">
    where< %="odiRef.getColList" ("",="" "t.="" [column]="S." [column]",="" "\n\t\tand\t",="" "",="" "uk")="" %="">
    )

    Similarly for new lines inserted

    insert into <%=odiRef.getTable("L","TARG_NAME","A")%> T
    (
         <%=odiRef.getColList("", "[COL_NAME]", ",\n\t", "", "((INS AND (NOT TRG)) AND REW)")%>
         <%=odiRef.getColList(odiRef.getColList(",", " ", "", "", "((INS and !TRG) and REW)"), "[COL_NAME]", ",\n\t", "", "((INS AND TRG) AND REW)")%>
    *, COL_FLAG. *
    )
    Select< %="odiRef.getColList" (" »,="" « [column]="" «, »="" \n\t »,="" « »,="" « ((ins="" et="" (pas="" trg))="" et="" rew) »)="" %="">
    < %="odiRef.getColList" (odiref.getcollist="" («, »,="" "«,="" « »,="" « »,="" « ((ins="" and !="" trg)="" et="" rew) »),="" « [expression]="" «, »="" \n\t »,="" « »,="" « ((ins="" and="" trg)="" et="" rew) »)="" %="">*, "INSERT."

    of <%=odiRef.getTable("L","INT_NAME","W")%> S

    It should work. Your target must have the column as "COL_FLAG" and do nothing for this column in the map interface.
    Thank you

  • Dynamic text field not updated to actionscript in the 2nd Frame

    I have a clip with two frames. In the 2nd frame there is a clip that has a text field.

    My goal is to some events that I will be proposing to the frame that has the clip with the text field.

    I'm trying to update the text field with a code something like: -.

    public void updateTxtFld(e:Event)

    {

    My goal is to certain events show the clip with the text field

    questBG.gotoAndStop ("glow");

    arrowText.text = "of the text." arrowTextt has been awarded with the correct text field

    }

    After some time I again back to the framework that has no movie clip masking so the clip

    public void masquer()

    {

    questBG.gotoAndStop ("idle");

    }

    The text field not updated since the actionscript code even if trace (arrowText.text) shows the updated value.

    Now, if I remove the clip of frames & change the updateTxtFld() as

    public void updateTxtFld(e:Event)

    {

    (questBG.getChildByName ('arrowBG') as Sprite) .visible = true;

    arrowText.text = "of the text." arrowTextt has been awarded with the correct text field

    }

    Then it works very well with the updated text in the text field. It seems that there seems to be a problem in dynamic text field update in frames.

    I also checked that the incorporation of text is fine in both cases

    I created the FLAS using CS Professional 5.5 & I am trying to change the text field using actionscript running in Flex Builder 4.7.   Let me know if I need to send the fla (working and non-working version).

    you are the assignment of text to arrowText before the timeline then moves to "shine".

    Use the render event to assign the text:

    public void updateTxtFld(e:Event)

    {

    My goal is to certain events show the clip with the text field

    questBG.gotoAndStop ("glow");

    internship. Invalidate();

    this.addEventListener (Event.RENDER, assignTextF);

    }

    function assignTextF(e:Event):void {}
    arrowText.text = "of the text." arrowTextt has been awarded with the correct text field
    }

  • Impossible to manually update the password field

    Hello

    I am very frustrated with this issue - I hope that someone can help me please.

    For the check of the user, I would like the following flow:

    (1) insert record with just the name and the email address (no password).

    (2) send an email with the link to a password update page by the way of kt_login_id and randomly generated number in the URL.

    (3) page updated password contains the password and password confirm text boxes

    This seems like it should be very simple, but I get strange results.

    My initial insertion sort page creates an entry for the password field in the database, even if there is no field of password on the Insert page and MySQL initial value must be NULL.

    Page updated password is not updated password field.

    I fear that MEASURE did something in the background because these updates relate to the connection table.

    Thank you!

    Steve

    Steve_2010 wrote:

    My initial insertion sort page creates an entry for the password field in the database, even if there is no field of password on the Insert page...

    When you place your page 'register.php' in Code view, is there still the line...

    $userRegistration-> addColumn ("password", "STRING_TYPE", "POST", "password");

    .. in place, and if so, what happens if you...

    (a) delete this line, or

    (b) change to:

    $userRegistration-> addColumn ("password", "STRING_TYPE", "VALUE", "");

    .. which should include at least a value empty (empty) in the password column.

    See you soon,.

    Günter

  • Restrict the metadata field during an update to a specific group of users

    Hi all

    I have some difficulty to find the best way to restrict permissions to change some fields of metadata for 2 different groups of users.

    I have two user groups, A and b. Group A will check in the documents that group B will then review for accuracy and quality. Group B will then update an optionlist field called "State" with "recommended" or "not recommended".
    This is not a situation of workflow as the scope requires that all documents are immediately available for research. I currently have a profile CheckIn and search for content to read write access for both groups A and B. The 'Status' field is hidden on the page of CheckIn. Can someone please suggest a good way to limit the 'Status' field on a page to update users to simply "B"? Groups A and B must be able to update all the fields except for the limited B field "Status".

    Thank you!

    Published by: user6750815 on June 2, 2010 16:11

    Hey rMac,.
    I understand in this way you have a profile for A and B groups of users. On this profile status field is hidden.

    If this is your problem, you can the two-step approach, while making the rule in order to hide the status field, use the activation of rule condition. Make active only for users with A role. This way even with the only profile some of the user with the role B will be able to see the status field.

    Alternatively, you can put a similar code to restrict the link of personalization where you make this hidden field editable and mandatory for users in B.

    see you soon,
    Sicard

Maybe you are looking for

  • Bluetooth enabling the M200

    Hello I just received my 2nd M200 which now has bluetooth compared to my first. When you try to activate the bluetooth device, I get a warning "Bluetooth is not ready." Even though I have the bluetooth device to connect enabled, it does not detect. N

  • I can't download a game that I already bought

    I bought the game "This War Of Mine" on my IPad Mini, I installed it on my Iphone too. Today I searched on my Macbook Pro (mid-2012) and I found it but it says I have to buy. I does not appear on my purchases... it is the same game so why should I ha

  • HP Pavilion dv7-6166nr USB 3.0 does not work

    My two USB 3.0 ports left do not work. In Device Manager it can't find the drivers for them.  I searched the forums, tried other drivers, tried the drivers for the latest drivers from Renesas USB 3.0 Host Controller and those who do not work either.

  • Question about Windows 7 Microsoft Paint

    Previously in paint, I was able to get rid of the background with a tool called 'magic wand '.  Where is he?  I can't find in this new version.

  • Only 1 VI can work at the same time?

    Hi, this is for my school project that requires buying an analog input of 2 circuits of sensor (1 with LDR, 1 with LM35 for temperature detection) and generates output so that a light bulb lights if the tension in the LDR circuit is too low and a fan