How to remove the label of xml data in sql

with a as
(select '<?xml version="1.0"?>
<ROWSET>
  <DEPT>
    <DEPTNO>10</DEPTNO>
    <DNAME>ACCOUNTING</DNAME>
    <LOC>NEW YORK</LOC>
    <EMP_LIST>
      <EMP_ROW>
        <EMPNO>7782</EMPNO>
        <ENAME>CLARK</ENAME>
        <JOB>MANAGER</JOB>
        <MGR>7839</MGR>
        <HIREDATE>09-JUN-1981 00:00:00</HIREDATE>
        <SAL>2450</SAL>
      </EMP_ROW>
    </EMP_LIST>
  </DEPT>
</ROWSET>' from dual)
select * from a;


I want the output after removing the same < HIREDATE > tag

<?xml version="1.0"?>
<ROWSET>
  <DEPT>
    <DEPTNO>10</DEPTNO>
    <DNAME>ACCOUNTING</DNAME>
    <LOC>NEW YORK</LOC>
    <EMP_LIST>
      <EMP_ROW>
        <EMPNO>7782</EMPNO>
        <ENAME>CLARK</ENAME>
        <JOB>MANAGER</JOB>
        <MGR>7839</MGR>       
        <SAL>2450</SAL>
      </EMP_ROW>
    </EMP_LIST>
  </DEPT>
</ROWSET>

Please help me

SQL> with a as (
  2  select '
  3  
  4    
  5      10
  6      ACCOUNTING
  7      NEW YORK
  8      
  9        
 10          7782
 11          CLARK
 12          MANAGER
 13          7839
 14          09-JUN-1981 00:00:00
 15          2450
 16        
 17      
 18    
 19  ' xmlcontent
 20  from dual
 21  )
 22  select xmlserialize(document
 23           xmlquery(
 24             'copy $d := .
 25              modify delete node $d/ROWSET/DEPT/EMP_LIST/EMP_ROW/HIREDATE
 26              return $d'
 27             passing xmlparse(document a.xmlcontent)
 28             returning content
 29           )
 30           indent
 31         ) as xmlcontent
 32  from a ;

XMLCONTENT
--------------------------------------------------------------------------------


  
    10
    ACCOUNTING
    NEW YORK
    
      
        7782
        CLARK
        MANAGER
        7839
        2450
      
    
  

Tags: Database

Similar Questions

  • How to remove the Tables of HFM Application in SQL

    Hi gurus

    1. how to remove the HFM Application Tables in SQL?
    Its manual removal but each application having 120-150 tables? How to do this in one fell swoop?

    I deleted some applications using the workspace / shared services, but still its display under HFM under the Tables of SQL Server.

    Please help me

    concerning
    Smilee

    Hi Smilee,

    1. If the application opens in the web management interface, go to Taskflows management module and make sure that no taskflows exist yet for this application. Remove any existing taskflows.

    2. If demand exists in Shared Services, right-click on the demand for Shared Services and try to remove the application from here

    3. stop Hyperion Shared Services and all the Windows of financial management processes and backups of the relational database of the two patterns.

    4. check the relational database of Hyperion Shared Services repository, in the "ces_apps" table and make sure that there are no lines containing the appname "EXAMPLE." If the line still exists you should enlist the help of Oracle Global Support software to clean Hyperion Shared Services before proceeding.

    5. it is possible to remove all content removed from the relational database of financial management application. Must be very careful when handling manually tables database that permanent damage can be done at the application and other applications if the wrong content is removed.

    (a) first remove all tables, indexes, sequences, and the package objects that begin with the name of the application
    (b) remove all tables starting HSV_appname_xxxxxx
    (c) remove all rows in tables referring to demand HSX_CLUSTER_xxxxx.
    (d) delete all the HSV_ACTIVITY_KILL_USERS, HSV_ACTIVITY_NO_ACCESS, HSV_ACTIVITY_SESSIONS and HSV_ACTIVITY_USERS and HSV_USERS_ON_SYSTEM lines that refer to the name of the application.
    (d) remove the line containing the name of the application from the HSX_DATASOURCES table.

    6. the next time that all Hyperion services are restarted, the application must be removed safely from Windows client.

    You can contact your DBA to write a query on how to remove it.

    Hope this helps,

    Thank you
    Charles Babu J

  • How to recover the server response XML data

    Hey fellows,

    So I wrote this piece of code that sends an image to a server (thanks a lot Mantaker for the position you where has written on it!) and then I expect to receive a response in the form of XML code. I tried to use getResponseMessage(), which gives me a nice 'OK '.

    How could I achieve this? I read somewhere that it might be possible through a feed, could you help me?

    I'll give you a lot of congratulations!

    If you already have the basics of an HttpConnection down, it gets a little easier later.

    Once you have the your HttpConnection InputStream you can create a Document for analysis using the built-in XML parser.

    public static Document getXmlDoc(InputStream in)
    {
        Document doc = null;
        DocumentBuilderFactory docBuilderFactory
            = DocumentBuilderFactory.newInstance();
    
        DocumentBuilder docBuilder;
    
        try {
            docBuilder = docBuilderFactory.newDocumentBuilder();
            docBuilder.isValidating();
    
            doc = docBuilder.parse(in);
            doc.getDocumentElement().normalize();
        } catch (Exception e) {
            System.out.println("getXmlDoc Error: " + e);
        }
    
        return doc;
    }
    

    It is a basic function that I use to read a XML from a web server. If there are errors reading or parsing of the document, this function returns null.

    After making sure that you close your InputStream, you can start reading your document.

  • How to remove the label addess when will links

    Whenever my mouse is over a link, the address is on the label at the bottom of the pages. It's REALLY annoying because the design of the websites that I use the most put the STATUS of the services at the bottom. So anywhere is my makeup of mice the non-visible STATUS. As I use the toolbar state of FireFox, I want this label to stop the display and the display of the address in the status bar.

    You can watch this extension:

  • How to remove the automatic result of Tuning of SQL

    Hello

    I recreated with index organized tables and dropped and added several indexes on the database tests. I am running performance tests, but I want to drop the "automatic SQL Tuning result" so that the results are not be confused with the old structure. How can I do this in Enterprise Manager or SQL?

    Best regards and thank you.

    Published by: kamilp on Sep 19, 2012 22:42

    You can use:

    exec DBMS_SQLTUNE.drop_tuning_task (TaskName-online "Name");

    Also read this useful Document:

    http://docs.Oracle.com/CD/B19306_01/server.102/b14211/sql_tune.htm
    http://www.Oracle-base.com/articles/10G/automatic-SQL-Tuning-10G.php

  • Portege M400 - how to remove the Protector Suite fingerprint data

    Hi all

    (1) Protector Suite 5.4 sometimes generated a crash of Windows XP on my Portege M400.

    (2) I followed the suggestion of WinXP and upgraded to version 5.8. Unfortunately, this way I lost the automatic access features to Web sites protected by (the online help 5.8 says that this module is optional, but I have not found how to install it).

    (3) so I uninstalled the 5.8 and put again on the 5.4.

    (4) in the event of a disaster.

    (5) it is clear that the fingerprint data, updated to 5.8 format, are still somewhere in the system. Uninstalling Protector Suite's not destroy them. For this reason the 5.4 original does not do something, because in its user opinion data are corrupted. First of all, I can't remove/change data user from inside the program.

    So, please, let me know where these data of fingerprints damned are so I'll be able to remove and Protector Suite from scratch.

    Thanks in advance.
    PEI

    Hello

    I think there must be a folder or files storing fingerprints
    But I m not sure where it is placed

    However, as far as I know, you can use ONLY PS to enrol fingerprints.
    Have a look here:
    http://img22.imageshack.us/i/protectorsuite.gif/

    There is an option that can cancel the stored fingerprints.

    If uninstalling the software didn't help then use and clean the BONES and using a tool, for example, the registry CCLeaner.
    It deletes all files and data on the HARD drive (in the registry) which have not been removed by Windows.

    Welcome them

  • How to remove the. (points) if they exist using sql

    Hi friends,
    I have a string where I want to cut it and take only the value before. (DOT)... If the point is not here, I have to take the whole string

    to ex accountant. matches the string then I should get that as an accountant and also check that he should only examine the last point in the chain and give the
    string before the.
    should give me as Senior.Accountant as Senior.Accountant.
    If the string ends on a point, it does not matter


    Help, please
    Thank you

    Perhaps this.

    SQL> with t
      2  as
      3  (
      4   select 'Accountant.' string from dual union all
      5   select 'Senior.Accountant.' from dual
      6  )
      7  select string, rtrim(string,'.') from t;
    
    STRING             RTRIM(STRING,'.')
    ------------------ ------------------
    Accountant.        Accountant
    Senior.Accountant. Senior.Accountant
    

    Concerning

    REDA

  • How to remove the data files of cRIO

    Please forgive my ignorance, but I don't see how to remove the old a cRIO data files.  I tried to get a functional data logger, and I have some old files of data on the cRIO.  I ftp copies files through IE, but I don't know how to delete the files from the cRIO.

    If you FTP via Windows Explorer, my computer, ftp://adresse IP in the address bar, you should be able to delete the files.

  • Separate the merge fields with tabs, how to remove if there is no data

    Hello

    I have a document of Idesign which merges the field from a csv file. Merging documents fields are separated by a tab, for example:

    {1001} {1002} {1003}

    {2002} {2003} {2001}

    {3001} {3002} {3003}


    etc.

    In some cases there is no data available in the csv file. This translates into a line blank in the document with only 2 tabs. Because the actual number of letters generated is huge to delete empty lines. How to solve this problem? Is there a way to only use the tabs if there is data in the fields and remove the line if no data is available?

    This string GREP only matches lines that contain nothing but the tabs and not match any line that made a valid data entry. If you used regular and right indent tabs you need to change to ^ [\t~y]+\r

  • How to remove the author's name and/or date of blogsite summary

    Hello

    Can someone help me please find where and how to withdraw the name of the author of the summary blogsite?

    I don't want any author's name listed, just the title linked blog and the date of publication.

    Or, is it possible to have the related title, with 50 words of the displayed article, but no name of author or creation date?

    I thank very you much in advance!

    I figured out how to remove the CSS author (.blogsitesumary duration-date {display: none}, but any attempt to change via CSS does not work.)

    For example, I can't create more space between the title and the date, or list items.

    Also, I would still add the first words of the post.

  • How to remove the value of the XML attribute in the Indesign file with javascript

    Hi all

    How to remove the value of the XML attribute in the Indesign file.

    1.jpg

    What error is this?

    in any case try this as well (one another),

    var myDoc = app.activeDocument;
    attrDelete(myDoc);
    function attrDelete(elm)
    {
        for (var i = 0; i < elm.xmlElements.length; i++)
        {
            try{
                for(j=0; j
    

    Vandy

  • How to remove the time &amp; date stamp

    Hi, I'm still learning Adobe Photoshop Elements 9, which is preloaded on my new computer. I don't have a user manual.

    Can someone tell me how to remove the date stamp and time of a photo.

    Try the spot Healing Brush tool or the Clone Stamp tool.

  • a date column, with timestamp... How to remove the timestamp

    Hello

    I have a table name WRESTLING, with one of its fieldnamed DATE, using the DATE data type.
    The date format incudes timestamp, can someone help me how to remove the timestamp part.
    I want only the part of date only. I tried this:

    Update DATE is to_char(date,'DD-MON-YYYY') set of CATCH;.
    but the result of all the date inside the table always have timestamp.

    can I use this:
    Update DATE is to_date(date,'DD-MON-YYYY') set of CATCH;.
    and still the same result.

    Can anyone advice on this? pls.
    Thank you

    user9353110 wrote:
    Thank you very much.. If this is the case, we can remove the timestamp when creating view for this table?

    No, you can never remove the component "hour" of a DATE.

    If you do not want to display a date in time (display purposes only!), use TO_CHAR to "transform" the DATE to a string with the format mask

    SQL> alter session set nls_date_format = 'dd-mm-yyyy hh24:mi'
      2  /
    
    Session altered.
    
    SQL> select sysdate
      2    from dual
      3  /
    
    SYSDATE
    ----------------
    17-03-2010 09:28
    
    SQL> select to_char (sysdate, 'dd-Mon-yyyy')
      2    from dual
      3  /
    
    TO_CHAR(SYSDATE,'
    -----------------
    17-Mar-2010
    
    SQL> select to_char (sysdate, 'yyyy-MON-dd')
      2    from dual
      3  /
    
    TO_CHAR(SYSDATE,'
    -----------------
    2010-MAR-17
    
    SQL> 
    

    NOTE: the example of last two are not DATEs! They are STRING

  • Tecra R10 - how to remove the memory module?

    Hello!

    How to remove the memory module?

    Get the following message and for me, it means that one of the modules is broken:

    Out of memory error
    Address = H 00034000
    Read Date = H 28034000
    Write data = H 00034000

    For my opinion, the computer should start up again when I remove the memory broken slice?

    The Australia has soon

    Hello

    You can easily remove the memory modules.
    I think that the Bay is placed at the bottom of the unit.
    Remove the screw that is blocking the Bay, and you will have access to the module.

    Here is a video of how do this on another Satellite L500 laptop. But the procedure is not very different on Tecra R10
    http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=81

    I hope this helps a little

  • any ideas on how to remove the software malicious zebrouss?

    any ideas on how to remove the software malicious zebrouss?

    This thing I replaces my setting of search in safari - can get rid of it - don't know who got it

    You may have installed ad-injecting malicious software ("adware").

    Do not use any type of product, "anti-virus" or "anti-malware" on a Mac. It is never necessary for her, and relying on it for protection makes you more vulnerable to attacks, not less.

    Save all data first.

    Some of the most common types of adware can be removed by following the instructions from Apple. But before you follow these instructions, you can try an automatic removal.

    If you are not already running the latest version of Mac OS X ("El Capitan"), update or upgrade in the App Store you could adware to automatically remove. If you are already using the latest version of El Capitan, you can still download the current update of the Apple Support downloads page and run it. Still, some types of malware will be deleted, not all. There is no such thing as the automatic removal of all possible malware, either by OS X third party software. That's why you can't rely on software to protect you.

    If the malware is deleted in your case, you will still need to make changes to the way you use your computer to protect you from new attacks. Ask if you need advice.

    If the malware is not automatically deleted, and you cannot remove yourself by following the instructions from Apple, see below.

    This simple procedure to detect any type of adware that I know. Disabling is a procedure distinct and better still.

    Some legitimate software is funded by advertising and may display advertisements in its own windows or in a web browser while it is running. It's not malware and it may not appear. In addition, some Web sites display advertising intrusive popup that can be confused with adware.

    If none of your web browsers work well enough to carry out these instructions, restart the computer in safe mode. Allows to temporarily disable the malware.

    Step 1

    Please triple - click on the line below on this page to select it, and then copy the text to the Clipboard by pressing Control-C key combination:

    ~/Library/LaunchAgents

    In the Finder, select

    Go ▹ go to the folder...

    from the menu bar and paste it into the box that opens by pressing command + v press return. Open a folder named "LaunchAgents", or you will get a notice stating that the file cannot be found. If the file is not found, proceed to the next step.

    If the folder opens, press the combination of keys command-2 to select the display of the list, if it is not already selected. Please don't skip this step.

    There should be a column in the update Finder window. Click this title two times to sort the content by date with the most recent at the top. If necessary, enlarge the window so that all the content show.

    Follow the instructions in this support article under the heading "take a screenshot of a window." An image file with a name starting in 'Screenshot' should be saved to the desktop. Open the capture screen and make sure it is readable. If this isn't the case, capture a small part of the screen indicating that what needs to be shown.

    Start a reply to this message. Drag the image file in the editing window downloading. Alternatively, you can include text in the response.

    Leave the case open for now.

    Step 2

    Do as in step 1 with this line:

    /Library/LaunchAgents

    The record which can open up will have the same name but is not the same as in step 1. In this step, the folder does not exist.

    Step 3

    Repeat with this line:

    /Library/LaunchDaemons

    This time the file will be called "LaunchDaemons."

    Step 4

    Open Safari preferences window and select the tab 'Extensions'. If the extensions are listed, post a screenshot. If there are no extensions, or if you cannot launch Safari, skip this step.

    Step 5

    If you use Firefox or Chrome browser, open the list of extensions and do as in step 4.

Maybe you are looking for

  • Missing command key

    Hello I have a brand new iPad 2 Pro.  I can't find a key on my keyboard, however. Instead, I have an emoji key where the control key should be. I checked my settings, and the keyboard is set to the standard version with the off emoticons. Is it possi

  • How to download live pictures

    HI can anyone please explain na step guide to post live photo Thank you

  • [X 1 carbon] HDMI does not work

    I just bought all new X 1 carbon and tried to connect to my TV using the HDMI line. However, the TV say "no signal". I tried to connect to my TV with other computer laptop (lenovo no) and apple TV (to check if there is a question online TV or HDMI),

  • Can someone tell me please how to convert a document image in a JPG image?

    I want to download my image saved as a document and says that I have to change it to a JPG image.

  • boring hard to read shadow text

    Can you help me remove the boring hard to read text behind the text shadows