How can I delete only one part of my xml file?

Hello,
I stored more than 100 users in only one xmltype column. For instance
Create table agro(users XMLTYPE);
... and I inserted all users inside
INSERT INTO agro values(XMLTYPE
('<?xml version="1.0" encoding="ISO-8859-1"?>
<authentication><users><user>
<name>cocoon</name>
<password>cocoon</password>
<role>admin</role>
<title>Mr.</title>
<firstname>Walter</firstname>
<lastname>Cocoon</lastname>
<company />
<street />
<zipcode />
<city />
<country>DE</country>
<phone />
<fax />
<email />
<bankid />
<bankname />
<accountid />
</user>
... another user, etc.
</users></authentication>'));
Now I tried to delete only one part of this file. For example all persons with the name"cocoon".
I used for this target the following statement:
DELETE FROM agro agro
WHERE agro.users.extract('authentication/users/user/text()').getStringVal()= 'cocoon';
When I execute this statement, Oracle DB delete all users and not only with the name "Cocoon".
How can I delete only one part of my xml file?
Kind Regards
M R

This the expected behavoir. You uploaded a document containing multiple users and then asked XML DB to delete any documnet that contained a user with the name in question. The problem here is that you are creating a mega document that contains an aggregation of user documents but then trying to work with individual user documents. This is a bad idea.
In general XML does not understand the concept of a collection of documents. It can only operate on one document at a time. Hence the tendancy to aggregate individual documents into a single larger document. Once you have an XML database, you can perform operations on collections of document, as easily as you can perform operations on individual documents, so the need to aggregate the individual documents together disappears.
If you store each user document as a seperate document then your delete will work as expected.

Similar Messages

  • HT204053 i RECENTLY PURCHASED ANOTHER IPHONE.  MY INTERNET IS NOT WORKING.  I JUST CREATED AN APPLE ID.  WHAT'S NEXT?  I NOW HAVE TWO DIFFERENT ACCOUNTS WITH DIFFERENT USER NAMES.  HOW CAN I USE ONLY ONE ACCOUNT FOR ITUNES, ICLOUD APPLE ID ETC???

    I RECENTLY PURCHASED ANOTHER IPHONE.  MY INTERNET IS NOT WORKING.  I JUST CREATED AN APPLE ID.  WHAT'S NEXT?  I NOW HAVE TWO DIFFERENT ACCOUNTS WITH DIFFERENT USER NAMES.  HOW CAN I USE ONLY ONE ACCOUNT FOR ITUNES, ICLOUD APPLE ID ETC???

    Welcome to the Apple community.
    iTunes and iCloud and different accounts, you will need to delete both accounts from your device before adding the new details in their place.
    For iCloud go to settings > iCloud, scroll down and hit the delete button. You can then sign back in using your correct details. For iTunes go to settings >store, tap your account ID and then sign out, you can then sign back in using your correct Apple ID.

  • Mysql datetime datatype, from that datetime how can i compar only time part

    Hello i have database table in mysql, there is Datetime datatype column, from that datetime how can i compare only time part .....??
    Thanks in advance...

    Note you can't simply just compare time via equality however.
    Timestamp resolution is to the second or even milli-second. No user wants to match a time to an exact millisecond.
    What they want is something like a match by hour - for example returning the number of transactions that happened from 1pm to 2pm. Even that isn't completely correct because then you need to consider whether 1pm and/or 2pm is inclusive or exclusive. Normally one end will be inclusive and the other exclusive.
    So first you need to define what the period is.
    Then construct the range.
    Then pass the range and, as already mentioned, use specific functions to handle the extraction of the time.

  • How can I see only one album by an artist?

    How can I see only one album by an artist, in the album view?

    Hi ladybugjlt,
    Thanks for visiting Apple Support Communities.
    See the "syncing manually" section of this article for help:
    iTunes: Syncing media content to iPod
    http://support.apple.com/kb/ht1351
    Regards,
    Jeremy

  • Help--How can I open only one java program at one time?

    How can I open only one java program(same program) in Windows at one time?

    In Java 1.5, you can use the JVM's own monitoring APIs to examine what other JVMs are running on the system, and what applications they're running.
    It's general and powerful, but complex. The socket/file/whatever approach is cleaner, and probably more suited to your usage.
    Don't bother trying to use the Windows task manager for this sort of thing. You have to write messy native code, and it isn't reliable after all that anyway.

  • How can I buy only one month service of indesign cc from online shop?

    How can I buy only one month service of indesign cc from online shop? it seems only allow to buy one year package service. PLA HELP !

    http://www.adobe.com/products/catalog/software._sl_id-contentfilter_sl_catalog_sl_software _sl_allsoftware.html#
    Click on Join, then from plan select: Month to month

  • TS3988 It seams that i have another Apple ID, how can i use only one for everything?

    It seams that i have another Apple ID, how can i use only one for everything?

    http://support.apple.com/kb/HT5622?viewlocale=en_US
    -The specific point:
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you are wondering how using multiple Apple IDs relate to iCloud, see Apple IDs and iCloud.

  • How can I transfer only one song from itunes to my iphone?

    How can I transfer only one song from itunes to my iphone without sync ( the whole library)?

    Untick every thing you dont want to transfer, tick only the ones you do want to transfer.

  • How can I extract only the audio as an aiff file?

    Using a Sony DSC-N2 Cybershot Camera I recorded video that was saved as “MOV01606.MPG”. The video plays back with sound in Quicktime Pro and iTunes but how can I extract only the audio as an aiff file?

    Use MPEG Streamclip (free) to convert your .mpg files to QuickTime formats.
    QuickTime can't extract audio from muxed file formats.

  • Some of my albums are in double in my iPod touch but they are only once in my iTunes, how can I delete the one in excess on my iPod

    Some of my music albums are doubled in my iPod Touch 4th generation, but they are only once in my iTunes library. how can I remove the one in excess in my iPod

    swipe to the right on the individual podcast, this will allow you to delete them right on the iPad.

  • I have multiple copies of photos that just keep duplicating, How can i keep only one of each?

    how can i delete duplicates without going through entire library?

    See Old Toad's list of tools (applications, scripts) that help you find duplicates:
    Re: Can I Open iPhoto into 2 screens?
    iPhoto does not support the removal of duplicates later - it checks for duplicates, when you import. Once imported, you only can sort the photos by date, so that duplicates will be shown side-by-side.

  • Installed lion os previous was snow leapard and now in launchpad I have 2 iPhoto icons, how can I delete inactive one?

    I had Snow Leapard and installed new lion os.  Now in launchpad I have 2 icons of iphoto. How can I delete inactive icon?

    Snow Leopard files were replaced by Mountain Lion files on install. Open Disk Utility and verfiy disk and repair if needed and also repair permissions. Then make sure all of your apps are compatible with Mountain Lion because incompatible apps can cause slow startup. Check all apps at www.roaringapps.com.

  • How can I delete only shared instance of a member from Hyperion Planning

    Hello,
    Can anyone tell me how I can instruct the Hyperion Planning IKM to delete a only specific instance of a shared member from Hyperion Planning? I've tried specifying the shared member, the parent of the shared instance, 'Shared' as the data storage type, and 'Delete level 0' as the operation. Instead of deleting just the shared instance under the specified parent, however, the IKM deleted the base member, which in turn deleted all shared instances of the member and all the data for the member (lucky thing I'm working in a development environment!). At one point I thought I had things working as I wanted, but now I think I must have mistaken.
    Does anyone know definitively whether only a specific instance of a shared member can be deleted from Planning and, if so, exactly how to do it?
    Thanks very much.

    Well, with a careful review of my ODI interfaces and some additional testing I found my problem. My interface for one dimension was defined exactly as it should be and it worked as expected, whereas I found I had failed to activate the mapping for the data storage property in my interface for another dimension (DOH!). Naturally, the latter interface deleted the base member because the default data storage property value is 'Store'.
    Thanks for testing and confirming that deleting only a specific shared instance of a member from Hyperion Planning does work, John.
    (P.S. to John: I can't see how to change my "Helpful" tag on your first reply to "Correct", so if you want to post another reply, I'll mark it "Correct" (for more points!). Or, if you can tell me how to modify the "Helpful" tag to "Correct" I'll do that instead.)
    Edited by: Mark on May 25, 2012 3:33 PM

  • How can I delete just one little picture from my new ipad2 ?

    This is my 1st Apple product an Ipad2. How in the world do you delete just one picture at a time??
    Thank you in advance.

    Only photos taken with the iPad, copied onto it via the camera connection kit, or saved from emails/wesites etc can be deleted directly on the iPad - either via the trashcan icon in the top right corner if viewing the photo in full screen, or via the icon of the box with the arrow coming out of it in thumbnail view. Photos that were synced from your computer are deleted by removing them from where they were synced from and then re-syncing.

  • How can I deploy only one package out of a big project?

    Does any one know how can I only deploy one package out of a big project?
    We have a project which includes about 12 differenct packages. Is there a way in Jdeveloper for me to create a deploy profile to only deploy one package to a *.jar file?
    Do I have to re-create a new project ( that's what I am doing currently) simply for deployment purpose?
    By the way, click and pick class from more than 100 classes is too much of work. In addition, you don't really know exactly which class you are picking if two classes (in different packages) have the same name.
    Thanks a lot.

    Rename your LCA file extention into .ZIP
    Open the ZIP file in any of the compressing utility (e.g. WinZip, WinRar etc.)
    Extract the desired process and deploy it manually to your server.
    Nith

Maybe you are looking for

  • Showing a particular page in release 2

    Hi I have determined that the following syntax will take me to a particular page within a page group: http://myserver.bla.com/pls/portal/url/page/EIP_NL/NOTLOGGEDINMAIN Is it possible to use this same syntax to get to a specific tab in a page group?

  • Two Spry Issues

    Widget issue one I returned to a company where a site was built. The builder used spry sliders or accordians, which are brand new to me. In evaluating the site, I notice that the Spry objects jog a little, left to right or vice versa. Is this normal

  • Dbca xlib connection to "0.0" refused by server errror

    i am using oracle enterprise linux 5.4 in virtual machine and i am trying to create a new database using the DBCA but when i do this an error is returned XLib: connection to "0.0" refused b server XLib: no protocol specified exception in thread main

  • Filter on order lines

    Hello, I have to do a report about orders and order lines with this need : if a certain product is in an order then i i don't want to see this order in my report, even if there are other order lines. I've tried to filter on the concerned product but

  • How to rename a transaction variant

    HI All, I have created a transaction variant for ME38 by using SHD0 and disabled a menu item('Generate 'Forc' Scheduling Agreement') under 'EDIT' function .Now i want to rename the transaction variant.Will that be possible if Yes,What is the soluiton