Help using XMLEXISTS

Version: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

Hello

I try to use XMLEXISTS to find out if a node, 'COMMENTS', is in the XML file.

The XML is stored in a clob in a table.

In a feature in a package, I am retrieving the clob and turn it into one using XMLTYPE:

get_results_xmltype: = xmltype.createxml (get_results_clob);

The XML may or may not contain this node 'COMMENTS' so I thought I could do:

SELECT CASE WHEN xmlexists ('Comments' TO get_results_xmltype) THEN 1 ELSE 0 END
IN v_comments
FROM XMLTABLE
("/ Comments/comment" ADOPTION get_results_xmltype)
COLUMNS
comment_col PATH VARCHAR2 (4000) "Comment");

v_comments is defined as a NUMBER.

I'm then to assess v_comments with an IF statement.

If the "COMMENTS" do not exist then I insert data into a table intermediary (as well as other areas of course) and if not I am insert NULL for that field in the staging table (as well as other areas of course).

My attempt above is not the 'COMMENTS' in the XML file and always returns 0 in v_comments where the 'COMMENTS' exist in the XML. If I well obviously don't do this properly.

Can someone help me with how to do it?

Can what additional information I provide for it?

Thank you

Joe

In your case, all you need is

SELECT CASE WHEN xmlexists ('/comments/comment' get_results_xmltype PASSAGE) THEN 1 ELSE END 0

IN v_comments

Double;

Tags: Database

Similar Questions

  • NEED HELP USING VISTA TO BURN/COPY AN AUDIO CD EXISTING

    NEED HELP USING VISTA TO COPY/BURN A CD EXISTING ON A VIRGIN CD

    To copy a CD of Vista, you need 3rd Party Software:

    This one is very good:

    http://www.SnapFiles.com/get/burningstudiofree.html

    Ashampoo Burning Studio Free is a full CD/DVD/Blu-Ray suite which allows you to create data disks, music, video and audio burning. You can also create backups that span multiple discs, rip music from an Audio CD and create or burn disc in ISO or BIN/CUE format images. The task-oriented interface makes it easy to get started and will spare you most of the technical details. Other features include the conversion of files to WAV, MP3, FLAC, WMA and Ogg audio automatic, disk copy compressed backup file and restore, erasing the disc, VCD/SVCD, burning project and support more. Free registration required after 10 days.

    See you soon.

    Mick Murphy - Microsoft partner

  • Help using Léonie / old Toad move the text of "Key words" in "securities".

    Need help to use leonie / old Toad move the text of "Key words" in "securities".

    I have about 30 000 images with keywords but NO Title.  I want to move / copy the text in the keywords section in the section of the title.

    So, I tried this Script: Add keywords to title - Script of Léonie field

    He did a little work, but not completely.

    When I select an image in Photos, and then "Get Info" I'll see below in the title area, notice that the first two lines are the same.

    IMG_2621.JPG

    IMG_2621.JPG

    March 12, 2014 14:23

    My keywords are: Experimental engine 17 to 600 hours

    AFTER I run the Script, I get the following:

    IMG_2621.jpg - 17-600 hours experimental engine

    IMG_2621.JPG

    March 12, 2014 14:23

    I need is:

    17 to 600 hours experimental engine

    IMG_2621.JPG

    March 12, 2014 14:23

    I do not understand why the Photos shows the name of the file twice.   These fields are not labelled, but I was under the impression that the top line was the Description, the second line is the name of the file, and the third line is the Date.   Because only the first line is displayed under thumbnails, I try to have as much descriptive information appear in this area (as in the past, we could do with iPhoto or Aperture).

    In other words, when I run the script I hold my keywords to replace everything in the top line completely, eliminating the name of the file. Is there something wrong with this approach?  I would still have the name of the file to the second line, right?

    Thank you.

    Remove the file name of the title field, and then run the script. You will have the chance

    -17 to 600 hours experimental engine

    You can manually delete the "-" at the beginning or modify the script.

  • I can't use Firefox, AddThis has frozen screen and it doesn't help - using IE now. What can I do?

    Yesterday I added AddThis extension for Firefox, and when it is installed on the opening this morning, it freezes the whole browser.

    I can't go anywhere else, only the box 'install AddThis', none of the other icons on the toolbar to work and or keyboard shortcuts. I can close the browser using Ctrl/Alt/Delete, etc.. But I need my browser. Help, please!

    Open Firefox in mode without failure of Firefox. Hold the SHIFT key when you double-click on the icon of the desktop Firefox. Do not choose anything except to continue in safe mode.

    Then Ctrl + Shift + A to open the Manager of Addons. In the Extensions list, press the button delete for this extension.

    Then close Firefox.

    I hope that your freezing problem will be resolved.

  • First HP: help using the command CAS.solve (STRING1, STRING2) within a program

    Hello and hope you can help me with my problem!

    I write a somewhat complicated program (operating mode no case) who has a subroutine called STSOLVE where his entry is always a string from the main program that contains a formula as "'I' = 'V' / 'R', 'R'" and its goal is to replace all the variables contained in "" to the compatible standard CASE generated automatically variable (teiXX where XX is a unique number) and then use the command solve to assess this formula (say final temporary formula "tei1 = tei2 / ') tei3, tei3"). Before returning, he replaces the temporary variables, generated automatically with the original on the result, so the original formula will be sent back solved in the main program.

    My problem:

    It returns the result {UNDEF} or simply {} even in expressions that absolutely work if used with the command solve manually, in the main screen of calculators CASES when the CAS.solve command is used either! Even though I know that the entry of this order is correct according to the tutorials I've read in the forums, I can't work properly.

    I tried all methods of writing the order and I only managed to get a result when I wrote this:

    RPART1: = cas.expr (RPART1);

    RESLT: = case. Solve (RPART1, "tei2");

    .. .or RPART1 contains, say, the part 'tei1 = tei2/tei3' (NOT AS A STRING!) and "tei2" SHOULD be written as shown here, a chain, entered manually just for test (can be 'tei1' or 'tei3' too for this particular case). However, if I put "tei2" in RPART2 of local variable in the subroutine as a string and then pass this variable to the solve command, say:

    RPART1: = cas.expr (RPART1);

    RESLT: = case. Solve (RPART1, RPART2);  RPART2 contains the string "tei2", "tei1" or "tei3.

    Here again, I get a {} as a result!

    I tried so already a lot of things that I don't know exactly what mention here, but I hope I described the main situation enough to start detailed and of course, I'll give you any other information you might need to give me more help. I tried to paste the entire subroutine, or even the entire program, but I don't have any windows pc to connect the first HP and copy the program. I am writing from an Android Tablet and I should maybe type the everything here is not very easy, I will of course if you ask.

    Perhaps, I should also note that the generated vars tei1, tei2 etc. do not exist as variables in the calculator, but if I copy channels same as the program tries to run in the command CAS.solve and manually write in case screen (not a string of course) then they get solved without problems.

    Hope to get help and learn from you and I wish I could found more help about it online, but it seems very difficult and also all the tutorials I found on the cas.solve command in the programs did not work in my case!

    Andreas

    It works, or is this not the problem?

    CAS.solve ("tei1 = tei2/tei3", "tei2");

    I get output: {tei1 * tei3} which is correct.

  • Help using 'save in the series of files (several files).

    Hello

    My name is Daniel R.

    I am a student doing research internship and was put on a project using LabView (with no experience using Labview).

    I'm using LabView student 2013 version 13.0 edition.

    Now the VI I created is to get data from a PMT using a Rigol DS1204B connected to Labview.

    The problem that arises has been save to a series of files (saving automatically). I intend to take at least 1000 tracks and naming manually, each is not very effective. I have my VI attached, if someone kindly took a peek. I suspect that the problem is her 'write as leader' in the block diagram. I put the option "Save in the series of files", however, when I double click on the "Write to the measure" box, I see that 'Save in a one file' is selected, and after a second, it automatically converts the option 'save in the series.

    I did not have enough experience about why he wants me to name each file, so I'm tender hand for help.

    Advice or improvements on my VI is also appreciated.

    Thank you

    Daniel R.

    Who says we can't dynamically build a file name each iteration of the loop?  I like to use the Format string to add the loop against a string which will be then turned into a path.

  • I need help using "calendar" in Windows Live Mail

    Problem 1: The 'properties' of one of the "calendars" within the watch WindowsLiveMail give it a READ ONLY status.   The 'properties' of this calendar also lead me to believe that it is filled with information on the birthday of my contact information.

    Q1: How does a calendar WLM to set READ ONLY?
    Q2: How can I change this status so that I can DELETE then?
    Q3: How 'do' a new calendar uses the information from my Contacts?  that is, if I create a 'new' calendar as a birthday or anniversary, how to
    Shoot all the information, anniversary or a birthday, as I said in my Contacts.  Apparently, it's supposed to happen, but it doesn't seem to be.
    Q4: When I set up a REMINDER in my calendar, exactly how I get recalled?  In Outlook, I'd get a pop-up window on my screen in the
    "reminder" calendar.  I have reminders set for all THE birthdays in my birthday calendar, but I have yet to get any form of reminder for any of them.  What I am
    hurt?
    Help!  Please, I beg you.  Thank you.
    Bob
    E-mail address is removed from the privacy *.

    Windows Live Mail is no not part of Windows, it is a part of Windows Live Essentials. (Yes I know the name of this forum is confusing!)
     
    You will get a response much better and more quickly by posting in the forum Windows Live Mail here:
     
    http://windowslivehelp.com/product.aspx?ProductID=15

  • Need help using the access list blocking a single IP address

    Basically, I'm being attacked by a massive spammer. I managed to deny him access to our mail server, however, his repeated attempts to connect to the same server is in our file of e-mail magazine. What I want to do is set up a block for its specific IP address in our 2621 router. I tried a few different combinations using access-list, but nothing helped. Can anyone suggest something? Thank you!

    Joe

    Joe,

    If you know that the attack came from a particular ip address, you can create an extended access list and deny that IP.

    access-list 101 deny ip host host of attacker_ip_address e-mail_server_ip

    If the source ip address is random then you must put a sniffer or take a look in the syslog to see if there are any model ID as a string. You can then configure NBAR on the router to mark the package and then drop the packets.

    Here is a link that explains the procedure:

    http://www.Cisco.com/en/us/NetSol/ns110/ns170/ns171/ns128/networking_solutions_white_paper09186a008009c8ad.shtml

    Thank you

    Renault

  • Transfer of pictures for a second time to help using Windows 7

    I'm having a problem transfer a photo to my computer.  I'm not young (!), but have generally been successful using the system of automatic transfer of Windows that appears.  I have a photo I kept it on my small device which I have already transferred, but I lost on the computer (don't ask!).  I would like to transfer once again, but don't know how to do in this regard.  Nothing comes up when I wire to the top of the camera to the computer that I guess because I already transferred.  Any help would be appreciated.  I have Windows 7 Professional amd a HP XT249EA desktop computer.  Thank you very much.

    Hello

    What is your camera? There should be a cable to go with it, or even better, you can remove the memory card and use a card reader to copy the photo to your computer. I'm not too young, I was born after WWII. Hope that I'm younger than you (sorry, just kidding).

    Kind regards

  • Error: "Windows could not update the configuration to start the computer. Installation cannot move forward"during the installation of Windows 8 64-bit OEM System Builder on Macbook Pro for help using Boot Camp

    Hello

    I have a brand new Macbook pro and I bought the OEM System Builder of 64-bit Windows 8 driver in a store. My problem is that I have not only not able to install it using Boot Camp. At the end of the installation, a message appears with the following text "Windows could not update the configuration to start the computer. Installation cannot continue.

    I'm not really a tech guy but I also tried to download virtual box and the same error comes back.

    Can someone help me please?

    Thank you!

    Original title: Windows 8 64-bit English OEM System Builder

    The thread is old now, but it is for those who always have this problem.

    When I got the error, I cancelled and restarted the machine. I pressed the 'option' button when starting upwards and he grew the boot partitions. You should see a 'EFI Boot' partition. Choose that and you restart the installation process, but this time it works.

    Supposedly the boot EFI and WinInstall partition should do the same thing. Manually, select one or the other.

  • Need help using the tabs of the apex to the universal theme.

    I tried using the enkitec boards to create tabs in page apex.

    But I'm unsucessfull and I used the apex as the version 5.

    The theme that I use is universal theme.

    https://www.enkitec.com/Apex/f?p=15300:30310:0:

    Also I'm tired the method too to create tabs below

    Creation of a region of the tab within a page in the APEX

    It's like

    In the HTML header, I'll add the code below

    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/redmond/jquery-ui.css" type="text/css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"> </script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"> </script> <script type="text/javascript"> $(function() {    $("#tabs").tabs();    $x("tabs").appendChild( $x("tabs-1"));    $x("tabs").appendChild( $x("tabs-2")); }); </script>

    Then I'll create 3 region.

    Region 1 > > > create a HTML region (REGION MODEL = MODEL number) and add the code below in the SOURCE of the REGION

    <div id="tabs"> <ul>    <li><a href="#tabs-1">Employee</a></li>    <li><a href="#tabs-2">Chart</a></li> </ul> </div>

    Region 2 > > > create HTML region... Add two fields to the region now, edit the region

    Add the code below in the header of the region to REGION 2

    <div id="tabs-1">

    Add the code below in the bottom of the region to REGION 2

    </div>

    Region 3 > > > create HTML region... Add two fields to the region now, edit the region

    Add the code below in the header of the REGION 3 region

    <div id="tabs-2">

    Add the code below in the bottom of the REGION 3 region

    </div>

    Example: http://Apex.Oracle.com/pls/Apex/f?p=12060:7

    I used exactly the same code... except that my region 2 contains a REPORT instead of two text field and region 3 GRAPHICS instead of text field.

    Kind regards

    Shijesh

    -------

    Please reward the answer if it was useful / correct


    I used the enkitecs method to create tabs.

    Tabs have been created, but the fields were visible inside.

    Will soon be replicating the scenario of apex.oracle.com

    Maybe someone can help.

    At the same time if there is no easy way to create tabs in apex page please let me know.

    Thank you

    Paul

    Hi pauljohny100,

    pauljohny100 wrote:

    I'd like to learn more about the region view selector

    You have a good resource on it.

    Selector display region is type of region, which shows the navigation links in the form of hyperlinks button for regions where the attributes of the region-> region selector display are set to Yes. Œuvres similar to jQuery tabs.

    Reference: ApEx 4.0 region selector | iAdvise blog (it's blog when it was introduced first in APEX 4.0)

    I have not found any Oracle Documentation on this, but it's taken APEX oracle supported the region type.

    You will find that this implemented in various packaged for example P-Track applications.

    Kind regards

    Kiran

  • I GOT 1 800 597 5649 FOR help USING a MICROVAULT USM4GMGM/WCQ 4 GB/GB. THER

    I got 1 800 597 5649 for help to use my new MICROVAULT 4 gb/GB File Rescue. This number did not. I bought this motto today. I need help to get started.  Bob

    What do you mean by "choose a Board?

    Hi rmhartian. What seems to be the question on your Microvault? Please provide clarification on the issue. Thank you.

  • NEED HELP - use in Animate gif files

    NEED HELP

    Reduce the Flash to animated GiF file file - reduce 65 KB without any loss of quality? How can I reduce a flash file for this standard of the industry?

    If you make an animated gif which must be less than 65 k, you need to use Photoshop, not animate and keep it under 5 total frames.  It won't be a complex animation with transitions and tweens; It would be fair to turn several different images/pictures.  Take a look at this tutorial I posted above to get an idea of the kind of thing you could do in a few images.

    For HTML5 Canvas in CC host, the source file is still a Fla, but published files will be HTML, Javascript, and images.  Do not build a HTML5 banner unless the plan of the record/media for what you work on him to permit.

    If HTML5 is allowed, you should know how ads are served (through Sizmek, DCM, Adwords, Flashtalking, etc.).  Each adserving company has slightly different requirements in terms of how files should be put in place and how clickTags should be implemented, so I can not give you any other advice, unless you know how your ads are served.

  • Please help - using SOA Application data synchronization

    Hi, I'm new to SOA please bear with me.


    My requirement is that we have two departmental stores with its own DB. We want application sync DB to work between that takes data from a database, transports to OSB, at the second store a second application should listen continually changes to data and write changes at its end.


    Point to note is that both DB machines are not allowed to see each other (ping) however both machines of SOA application server see and talks with their respective DBs of course. In both stores, we use Oracle 11 g DB and more.


    Hand from above:


    1. do I need to use at both ends?

    2. What are the components would be used?

    3. what would be the case/sequence using components?

    4. He will serve to the console of the OSB?



    Any help would be very appreciated, including tutorials, use cases, describe and sequence as the way to approach it.

    Sorry for the long question

    Thanks in advance

    This is a tutorial on DbAdapter and SQL operation usign BPEL: http://learn-oraclesoa.blogspot.com/2013/05/oracle-database-adapter-in-soa-11g.html but also explains the operation of the election.

    I believe that the steps 1, 2 and 3 of this series https://blogs.oracle.com/soaproactive/entry/jms_step_8_how_to and the Java EE tutorial are enough to get started with JMS.

    I hope to post about it soon. Is always nice to share, I hope this helps.

    Kind regards.

  • Help using office-API - getStatsOfResourcesCSV with Powershell Invoke-RestMethod

    Hi all

    I want to extract metrics data vRops in CSV, I found getStatsOfResourcesCSV but can not do work... the file comes out in JSON or XML, but never in CSV.

    The documentation isn't really clear to me... anyone know how I can CALL him to display the data in CSV?

    Part of the script.

    $ContentType = application/json"; charset = utf-8 ".

    $header = new-Object "System.Collections.Generic.Dictionary [[String] [String]].

    JSON output #For

    $header. Add ("accept", "application/json")

    #For XML output

    #$header. Add ("Accept", "application/xml '")

    Call-RestMethod-method GET - uri " " https://192.168.0.3/suite-api/api/resources/stats?resourceId=UUID1 & resourceId = UUID2 & statKey = cpu | costop_summation & statKey = cpu | usage_average & statKey = mem | statKey & request = mem: usage_average & statKey = cpu | costopPct & rollUpType = AVG & intervalType = DAYS ' - Credential $cred - ContentType $ContentType - Headers $header - OutFile 'Output.csv' '.

    Hello

    A blog around vRops API in general vRops API consumed with Powershell - Michael Ryom

    I haven't played with getStatsOfResourcesCSV and have not had the time to do so - but in general in vRops API, you must specify the format - if you look at my blog you can see that I used '& format = csv' out data in csv instead of xml (I belive you can also do it this way to json).

    Hope this helps

Maybe you are looking for