SQL script for exporting table

Could anyone please help me with SQL (plain SQL, not PL/SQL) for writing the data from a table into a .csv file?
I need to run it on SQL developer. Can't use spool because it works only on SQL*PLus
Edited by: user10403078 on Oct 15, 2008 2:24 AM

But I want the SQL script to create a CSV file, because it should write the data from the tables into a CSV file, and proceed to delete it from the tables, every time the SQL script is run. I can't manually click and save.

Similar Messages

  • How to get SQL script for generating table, constraint, indexes?

    I'd like to get from somewhere Oracle tool for generating simple SQL script for generating table, indexes, constraint (like Toad) and it has to be Oracle tool but not Designer.
    Can someone give me some edvice?
    Thanks!
    m.

    I'd like to get from somewhere Oracle tool for
    generating simple SQL script for generating table,
    indexes, constraint (like Toad) and it has to be
    Oracle tool but not Designer.
    SQL Developer is similar to Toad and is an Oracle tool.
    http://www.oracle.com/technology/products/database/sql_developer/index.html

  • Generating SQL Script for Existing Tables and DBs

    Hello,
    is it possible to generate automatically a SQL-Script from an existing table or oracle database ?
    I want to export an existing table from an Oracle DB (g11) if its possible with the data.
    Perhaps somebody could me explain how to to do this.
    I am using the "SQL Developer 2.1" and the "enterprise manager konsole".
    I'm a rookie in using this tools.
    Thank you for any informations.
    N. Wylutzki

    If you want to export data, you should use the export utility. This is documented:
    http://tinyurl.com/23b7on

  • Scheduler for Export Table utility using PL/SQL developer Tool

    Hi,
    Is there any way by which i can schedule manually export tables from a user using PL/SQL developer tool 'Export Tables' utility.
    As i have lot many schema a for each i have to manually exporting all tables using this utility.
    Please suggest.
    Thanks,

    Hello,
    do you mean PL/SQL developer from Allroundautomation? Then this is the wrong forum.
    Do you mean the export feature from SQL Developer, that you can invoke on right click in a result pane? You cannot automate it.
    But if you tell us more about your requirements we might be able to find a good solution for you. Yet this is a question for the {forum:id=75} forum. There is a FAQ {message:id=9360007}. This combined with dbms_scheduler or a scheduled job on your computer might solve the problem.
    Regards
    Marcus

  • How to find out the script for the table using SQL

    Hi,
    Could any one tell me that how to find out the script for the table using SQL.
    Thanks,
    kamal

    Kamal,
    You can find the SQL query in Advanced tab of Answers
    Thanks,
    Balaa...

  • Shell script for online table redefinition

    Hi,
    Could someone help me out in building a script for online table redefinition in AIX 11g, moving the table into a new table space.
    Thanks

    You are embarking upon a voyage in which you will expend a substantial effort reinventing the wheel.
    Look at Oracle DBMS_REDEFINITION built-in package.
    http://www.morganslibrary.org/reference/pkgs/dbms_redefinition.html
    and never do something outside the database, in a proprietary language, that can be done far more efficiently inside the RDBMS in a platform independent language.
    In other words, inside the database, I could code your entire project with error handling, in far less than an 15 minutes including testing.
    With a simple DDL statement, issued at the command prompt in SQL*Plus ... I could do it in less than 15 seconds: Your choice.
    ALTER TABLE <table_name> MOVE TABLESPACE <new_tablespace_name>;

  • Generate script for filling table

    Hi all,
    I've got table at test Oracle server table1 with columns ID, BTYPE, MYDESCRIPTION. Rows of this table have been inserted manually. Now my need is to write script for creating table (structure + data). I think about writing something like
    CREATE TABLE table 1
    AS
    SELECT 1 AS ID, 'TYPE1' AS BTYPE, 'SOME TEXT' AS MYDESCRIPTION
    UNION ALL
    SELECT 2 AS ID, 'TYPE2' AS BTYPE, 'SOME TEXT 2' AS MYDESCRIPTION
    But rows are too many to type... Could you please suggest some way of generating script for creating table at working server using existing table at test server? The problem is I don't have an access to working server.
    Thanks ahead.

    Use the view user_tab_cols
    say
    declare
    cursor c1 is
    select 'e_'||column_name ||' '||data_type||' ('||data_length||') ' col
      from user_tab_cols
      where table_name = 'DEPARTMENTS'
    union
    select 'd_'||column_name ||' '||data_type||' ('||data_length||') ' col
      from user_tab_cols
      where table_name = 'EMPLOYEES';
    v1 varchar2(500);
    begin
    v1 := 'create table new_tabl (';
    for i in c1 loop
    v1 := v1||i.col||',';
    end loop;
    v1 := substr(v1,1,length(v1)-1);
    dbms_output.put_line(v1||')');
    end;
    /i am using employees and departments table of hr schema.
    now as both the tables have some column column so i have used e for employees and d for departments
    just do one thing remove the length for date data type in o/p i dont know why it is not working.
    this will give you structure for data use any sql stmt
    Edited by: 810345 on Jun 9, 2011 9:58 PM

  • Please help me resolve the Lync server 2013 deployment error: "An error occurred while applying SQL script for the feature BackendStore."

    I am getting an error in "Step 2 - Setup or Remove Lync Server Components" of "Install or Update Lync Server System" step.
    "An error occured while applying SQL script for the feature BackendStore. For details, see the log file...."
    Additionally, all previous steps such as: Prepare Active Directory, Prepare first Standard Edition server, Install Administrative Tools, Create and publish topology are done without any errors. The user that I used to setup the Lync server is member of:
    Administrators
    CSAdministrator
    Domain Admins
    Domain Users
    Enterprise Admins
    Group Policy Creator Owners
    RTCComponentUniversalServices
    RTCHSUniversalServices
    RTCUniversalConfigReplicator
    RTCUniversalServerAdmins
    Schema Admins
    I have tried to re-install all the things and started to setup a new one many times but the same error still occurred. Please see the log below and give me any ideas/solutions to tackle this problem.
    ****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.BlobStore'****
    Initializing DbSetupBase
    Parsing parameters...
    Found Parameter: SqlServer Value lync.lctbu.com\rtc.
    Found Parameter: SqlFilePath Value C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup.
    Found Parameter: Publisheracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group;RTC Local Administrators;LCTBU\RTCUniversalServerAdmins.
    Found Parameter: Replicatoracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group.
    Found Parameter: Consumeracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group;RTC Local Read-only Administrators;LCTBU\RTCUniversalReadOnlyAdmins.
    Found Parameter: DbPath Value D:\CsData\BackendStore\rtc\DbPath.
    Found Parameter: LogPath Value D:\CsData\BackendStore\rtc\LogPath.
    Found Parameter: Role Value master.
    Trying to connect to Sql Server lync.lctbu.com\rtc. using windows authentication...
    Sql version: Major: 11, Minor: 0, Build 2100.
    Sql version is acceptable.
    Validating parameters...
    DbName rtcxds validated.
    SqlFilePath C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup validated.
    DbFileBase rtcxds validated.
    DbPath D:\CsData\BackendStore\rtc\DbPath validated.
    Effective database Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath.
    LogPath D:\CsData\BackendStore\rtc\LogPath validated.
    Effective Log Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\LogPath.
    Checking state for database rtcxds.
    Checking state for database rtcxds.
    State of database rtcxds is detached.
    Attaching database rtcxds from Data Path \\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath, Log Path \\lync.lctbu.com\D$\CsData\BackendStore\rtc\LogPath.
    The operation failed because of missing file '\\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath\rtcxds.mdf'
    Attaching database failed because one of the files not found. The database will be created.
    State of database rtcxds is DbState_DoesNotExist.
    Creating database rtcxds from scratch. Data File Path = D:\CsData\BackendStore\rtc\DbPath, Log File Path= D:\CsData\BackendStore\rtc\LogPath.
    Clean installing database rtcxds.
    Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
    ****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RtcSharedDatabase'****
    Initializing DbSetupBase
    Parsing parameters...
    Found Parameter: SqlServer Value lync.lctbu.com\rtc.
    Found Parameter: SqlFilePath Value C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup.
    Found Parameter: Serveracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group.
    Found Parameter: DbPath Value D:\CsData\BackendStore\rtc\DbPath.
    Found Parameter: LogPath Value D:\CsData\BackendStore\rtc\LogPath.
    Trying to connect to Sql Server lync.lctbu.com\rtc. using windows authentication...
    Sql version: Major: 11, Minor: 0, Build 2100.
    Sql version is acceptable.
    Validating parameters...
    DbName rtcshared validated.
    SqlFilePath C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup validated.
    DbFileBase rtcshared validated.
    DbPath D:\CsData\BackendStore\rtc\DbPath validated.
    Effective database Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath.
    LogPath D:\CsData\BackendStore\rtc\LogPath validated.
    Effective Log Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\LogPath.
    Checking state for database rtcshared.
    Reading database version for database rtcshared.
    Database version for database rtcshared - Schema Version5, Sproc Version 0, Update Version 1.
    Thanks and Regards,
    Thanh Le

    Thanks Lạc
    Phạm 2
    I Had similar issue i end up uninstalling and reinstallting but same issue, then i change the drive but same issue. It was I/O issue. After adjusting my I/O it fix our issue and installation went on without any issue. 
    If any one using KVM here is detail article 
    We just  give this option cache=‘writeback
    using this article http://www.ducea.com/2011/07/06/howto-improve-io-performance-for-kvm-guests/ and http://itscblog.tamu.edu/improve-disk-io-performance-in-kvm/ this fix my issue thanks 

  • An error occurred while applying SQL script for the feature BackendStore.

    Hello,
    I am using my AD in Windows Azure VMs. I created new VM of A3 (4 cores, 7 GB Memory) Windows Server 2012 R2, Port 1433 MSSQL added, made it a member of Domain and planned to install first Lync Server 2013 on it.
    In "Setup or Remove Lync Server Components" of "Install or Update Lync Server System", got an Red Coloured text "An error
    occurred while applying SQL script for the feature BackendStore."
    I have not enabled monitoring and archiving server in topology builder. I added "Network Service" and assign "Full Control" in Security Permissions of "C:\CsData" and "C:\LyncShare".
    I executed the SQL Setup Wizard and upgraded any instance to 2012.
    Please guide.
    Thanks, Divyaprakash Koli

    Please check you have enough disk space for the disk where the folders are.
    Check view log for detailed log information.
    The following link is a similar thread for you to refer:
    http://social.technet.microsoft.com/Forums/lync/en-US/a3cb9ab0-7451-4df5-af96-3d2784d1b075/an-error-occurred-while-applying-sql-script-for-the-feature-backendstore-for-details-see-the-log?forum=lyncdeploy
    Lisa Zheng
    TechNet Community Support

  • Shell script for export backup in oracle 11g

    Hi,
    Oracle version 11.2.0..
    O/S-AIX
    How to write shell script for export full backup in oracle 11g and also need to remove 2 days of old backup.
    Regards,
    Raju

    How to write shell script for export full backup in oracle 11g
    Do you mean that export is your backup strategy ? is your database running in noarchivelog mode ? if so, then why ? if not so, then why not RMAN ?
    need to remove 2 days of old backup.
    If that mean remove files older than 2 days, you can use something like this :
    $ find <absolute directory path> -mtime +2 -exec rm {} \;

  • Script for export in datapump  -- help needed !!!

    hello all,
    i am using the following script as batch file in my database for export
    script:
    =========
    exp name/password file=d:\exp\%date%.dmp full=y log=d:\exp\exp.log an this will replace the first file(monday) on next monday.
    similar way i need a script for data pump for full database export using datapump
    thanks ,
    gold

    login to database as a dba and create directory for your dumpfile path.
    create directory dpump_dir as 'd:\exp';
    and then use the below script for export.
    expdp username/password full=y directory=dpump_dir dumpfile=%date%.dmp logfile=exp.log

  • An error occurred while applying SQL script for the feature BackendStore. For details, see the log file

    Hello
    i got this error in step2
    Error: An error occurred while applying SQL script for the feature BackendStore. For details, see the log file 'C:\Users\administrator.RCC\AppData\Local\Temp\2\Create-BackendStore-lync.rcc.local_rtc-[2013_09_23][09_05_16].log'
    here is full summary
    > Bootstrap-CsComputer
    Logging status to: C:\Users\administrator.RCC\AppData\Local\Temp\2\BootstrapFull-[2013_09_23][12_17_37].html
    Checking prerequisites for bootstrapper...
    Checking prerequisite WMIEnabled...prerequisite satisfied.
    Checking prerequisite NoBootstrapperOnBranchOfficeAppliance...prerequisite satisfied.
    Checking prerequisite SupportedOS...prerequisite satisfied.
    Checking prerequisite NoOtherVersionInstalled...prerequisite satisfied.
    Host name: lync.rcc.local
    Disabling unused roles...
    Executing PowerShell command: Disable-CSComputer -Confirm:$false -Verbose -Report "C:\Users\administrator.RCC\AppData\Local\Temp\2\Disable-CSComputer-[2013_09_23][12_17_46].html"
    Checking prerequisites for roles...
    Checking prerequisite SupportedOS...prerequisite satisfied.
    Checking prerequisite SupportedOSNoDC...prerequisite satisfied.
    Checking prerequisite SupportedSqlRtcLocal...prerequisite satisfied.
    Checking prerequisite WMIEnabled...prerequisite satisfied.
    Checking prerequisite NoOtherVersionInstalled...prerequisite satisfied.
    Checking prerequisite PowerShell...prerequisite satisfied.
    Checking prerequisite WindowsIdentityFoundation...prerequisite satisfied.
    Checking prerequisite SupportedServerOS...prerequisite satisfied.
    Checking prerequisite NoUnsupportedWinFab...prerequisite satisfied.
    Checking prerequisite SupportedSqlLyncLocal...prerequisite satisfied.
    Checking prerequisite SupportedSqlRtc...prerequisite satisfied.
    Checking prerequisite IIS...prerequisite satisfied.
    Checking prerequisite IIS7Features...prerequisite satisfied.
    Checking prerequisite ASPNet...prerequisite satisfied.
    Checking prerequisite KB2646886Installed...prerequisite satisfied.
    Checking prerequisite BranchCacheBlock...prerequisite satisfied.
    Checking prerequisite WCF...prerequisite satisfied.
    Checking prerequisite WindowsMediaFoundation...prerequisite satisfied.
    Checking prerequisite SqlInstanceRtcLocal...prerequisite satisfied.
    Checking prerequisite VCredist...prerequisite satisfied.
    Checking prerequisite SqlNativeClient...prerequisite satisfied.
    Checking prerequisite SqlClrTypes...prerequisite satisfied.
    Checking prerequisite SqlSharedManagementObjects...prerequisite satisfied.
    Checking prerequisite UcmaRedist...prerequisite satisfied.
    Checking prerequisite WinFab...prerequisite satisfied.
    Checking prerequisite MicrosoftIdentityExtensions...prerequisite satisfied.
    Checking prerequisite SqlInstanceLyncLocal...prerequisite satisfied.
    Checking prerequisite SqlInstanceRtc...prerequisite satisfied.
    Checking prerequisite RewriteModule...prerequisite satisfied.
    Checking prerequisite SpeechPlatformRuntime...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ca-ES_Herena...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_da-DK_Helle...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_de-DE_Hedda...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-AU_Hayley...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-CA_Heather...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-GB_Hazel...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-IN_Heera...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_en-US_Helen...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_es-ES_Helena...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_es-MX_Hilda...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_fi-FI_Heidi...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_fr-CA_Harmonie...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_fr-FR_Hortense...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_it-IT_Lucia...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ja-JP_Haruka...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ko-KR_Heami...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_nb-NO_Hulda...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_nl-NL_Hanna...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_pl-PL_Paulina...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_pt-BR_Heloisa...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_pt-PT_Helia...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_ru-RU_Elena...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_sv-SE_Hedvig...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_zh-CN_HuiHui...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_zh-HK_HunYee...prerequisite satisfied.
    Checking prerequisite MSSpeech_TTS_zh-TW_HanHan...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ca-ES_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_da-DK_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_de-DE_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-AU_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-CA_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-GB_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-IN_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_en-US_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_es-ES_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_es-MX_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_fi-FI_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_fr-CA_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_fr-FR_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_it-IT_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ja-JP_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ko-KR_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_nb-NO_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_nl-NL_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_pl-PL_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_pt-BR_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_pt-PT_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_ru-RU_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_sv-SE_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_zh-CN_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_zh-HK_TELE...prerequisite satisfied.
    Checking prerequisite MSSpeech_SR_zh-TW_TELE...prerequisite satisfied.
    Checking prerequisite UcmaWorkflowRuntime...prerequisite satisfied.
    Installing any collocated databases...
    Executing PowerShell command: Install-CSDatabase -Confirm:$false -Verbose -LocalDatabases -Report "C:\Users\administrator.RCC\AppData\Local\Temp\2\Install-CSDatabase-[2013_09_23][12_17_52].html"
    An error occurred while applying SQL script for the feature BackendStore. For details, see the log file 'C:\Users\administrator.RCC\AppData\Local\Temp\2\Create-BackendStore-lync.rcc.local_rtc-[2013_09_23][12_17_54].log'
    what should i do?
    Please help me

    Hi,
    The issue may be related to disk read and write cache. Here is a similar case for your reference:
    http://blog.kloud.com.au/2013/07/15/publish-lync-2013-with-2012-r2-preview-web-application-proxy/
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
    sure that you completely understand the risk before retrieving any suggestions from the above link.
    Kent Huang
    TechNet Community Support

  • Make a script for build table

    Hi everyone
    How to make a script for build table:
    col width 25mm
    align decimal
    align on close paren
    Thanks
    Teetan

    Hi Teetan VK,
    Merry Chrismas.
    I'm not really an InDesign scripter.
    But you can try the following code:
    // TableCreate_simple.jsx
    // regards pixxxelschubser
    var aDoc = app.activeDocument;
    // your width of every column
    var w = Number(prompt("width of columns", 25));
    var NrOfColumns = 3;
    var aTextFrame = aDoc.textFrames.add({visibleBounds:[0, 0, 30, NrOfColumns*w + 1]});
    var aTable = aTextFrame.insertionPoints[0].tables.add({columnCount:NrOfColumns,bodyRowCount:1});
    for (i=0; i<aTable.columns.length; i++) {
    aTable.columns[i].width = w;
    // Paragraph sytyle with decimal aligning should already exists in your document
    for (j = 0; j < aTable.cells.length; j++) {
        aTable.cells[j].texts[0].appliedParagraphStyle = aDoc.paragraphStyles.item("AlignDecimal");
    Be sure, that a paragraph style (named with "AlignDecimal") exists in your Document.
    But what is:
    Teetan VK schrieb:
    … align on close paren …

  • Scripts for Exporting Master/Work Rep

    Hi,
    I want to automate the export process and in turn was looking for any scripts for exporting the whole ODI Work/Master Rep. I checked the CLASS objects and we donot have any CLASS names for Repository exports.
    Thanks in advance for any answers..!

    Created for 10g [ http://odiexperts.com/automize-the-backup-using-odi-exports]
    but should work for 11g too :)

  • Required to create a script for base table update using XMLSTORE package.

    Hi can anybody provide me some help full suggestion on how to update base table using XMLSTORE package.
    I created a simple script for Employee table and can able to do the basic operation like Insert and update on the table.
    Query is as follow's
    DECLARE
    insCtx DBMS_XMLSTORE.ctxType;
    rows NUMBER;
    xmlDoc CLOB :=
    '<ROWSET>
    <ROW num="1">
    <EMPLOYEE_ID>922</EMPLOYEE_ID>
    <SALARY>1801</SALARY>
    <HIRE_DATE>17-DEC-2007</HIRE_DATE>
    <JOB_ID>ST_CLERK</JOB_ID>
    <EMAIL>RAUSSJACK</EMAIL>
    <LAST_NAME>JACK</LAST_NAME>
    <DEPARTMENT_ID>20</DEPARTMENT_ID>
    </ROW>
    <ROW>
    <EMPLOYEE_ID>923</EMPLOYEE_ID>
    <SALARY>2001</SALARY>
    <HIRE_DATE>31-DEC-2005</HIRE_DATE>
    <JOB_ID>ST_CLERK</JOB_ID>
    <EMAIL>PATHAK</EMAIL>
    <LAST_NAME>PRATIK</LAST_NAME>
    <DEPARTMENT_ID>20</DEPARTMENT_ID>
    </ROW>
    </ROWSET>';
    BEGIN
    insCtx := DBMS_XMLSTORE.newContext('EMPLOYEES'); -- Get saved context
    DBMS_XMLSTORE.clearUpdateColumnList(insCtx); -- Clear the update settings
    -- Set the columns to be updated as a list of values
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'EMPLOYEE_ID');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'SALARY');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'HIRE_DATE');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'JOB_ID');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'EMAIL');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'LAST_NAME');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'DEPARTMENT_ID');
    -- Insert the doc.
    rows := DBMS_XMLSTORE.insertXML(insCtx, xmlDoc);
    --COMMIT;
    DBMS_OUTPUT.put_line(rows || ' rows inserted.');
    -- Close the context
    DBMS_XMLSTORE.closeContext(insCtx);
    END;
    SELECT employee_id, LAST_name FROM employees WHERE employee_id = 114;
    DECLARE
    updCtx DBMS_XMLSTORE.ctxType;
    rows NUMBER;
    xmlDoc CLOB :=
    '<ROWSET>
    <ROW>
    <EMPLOYEE_ID>114</EMPLOYEE_ID>
    <LAST_NAME>PRABHU</LAST_NAME>
    </ROW>
    </ROWSET>';
    BEGIN
    updCtx := DBMS_XMLSTORE.newContext('EMPLOYEES'); -- get the context
    DBMS_XMLSTORE.clearUpdateColumnList(updCtx); -- clear update settings
    -- Specify that column employee_id is a "key" to identify the row to update.
    DBMS_XMLSTORE.setKeyColumn(updCtx, 'EMPLOYEE_ID');
    rows := DBMS_XMLSTORE.updateXML(updCtx, xmlDoc); -- update the table
    DBMS_XMLSTORE.closeContext(updCtx); -- close the context
    commit;
    END;
    Nowi want little modification on this above query like as i am passing static XML tags and i want it to pick the dynamic XML from web and use the XMLSTORE for the update.
    and also for complex XML having 2-3 levels how this query needs to be changed.As i am new to this Oracle utillity any help from xepert will be a great help for me.
    Thanks

    Nowi want little modification on this above query like as i am passing static XML tags and i want it to pick the dynamic XML from webFrom a Web Service?
    You'll need UTL_HTTP or HttpUriType interface to send the request and receive the XML response.
    Search in the forum, there are already a lot of useful examples available.
    and also for complex XML having 2-3 levels how this query needs to be changed.DBMS_XMLStore is OK for readily processing a canonical XML format (/ROWSET/ROW/COLUMN structure or alike).
    However, if you have to deal with a more complex structure, you either have to :
    - use a target object table that matches the XML structure
    - preprocess the input document using XSLT to transform it to canonical format
    That's why DBMS_XMLStore is not appropriate for multilevel documents, especially if they contain nested repeating groups.
    In this case, XMLTable is a more flexible way of parsing the XML and process it relationally at the same time.
    Depending on the size of the document, performance may be improved with schema-based object-relational storage.
    For more help, please post a new thread in the {forum:id=34} forum, with the following information :
    - database version (select * from v$version)
    - a sample XML document (the complex one)
    - DDL of your target table
    - mapping between XML elements and columns (ie which tag goes to which column?)
    - an XML schema (if you have one)

Maybe you are looking for