Error in creating an external table referring to a XML file

I've got an XML file and I've tried to create an external table referring to it in this way:
CREATE TABLE mytable
    XML_DATA_COLUMN XMLType
  ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY TEST_DIR
    ACCESS PARAMETERS ( records delimited BY newline
    (XML_DATA_COLUMN LOB) ) LOCATION ( 'myfile.xml' )
where TEST_DIR is the directory where myfile.xml is stored,
but I get this message:
Error at Command Line:3 Column:4
Error report:
SQL Error: ORA-30656: column type not supported on external organized table
30656.0000 -  "column type not supported on external organized table"
*Cause:    Attempt to create an external organized table with a column
           of type LONG, LOB, BFILE, ADT, or VARRAY.
*Action:   These column types are not supported, change the DDL.
I want to have in the XML_DATA_COLUMN the content of myfile.xml so as to handle it by using extract and extractvalue functions.
My oracle version is 10gR2 Express Edition
Thanks!

The examples in the following thread include an insert, but you could also use the select statement alone without the insert.
http://www.orafaq.com/forum/mv/msg/172162/511897/0/#msg_511897

Similar Messages

  • Create an external table based on an XML file

    Hi ,
    I am trying to create an external table based on XML file .Is it possible to do in OWB ?If Yes .Can someone please let me know the same .
    I was successfully able to create an external table based on a flat file which is of the extension *.txt.
    I was even able to load an XML file to a normal
    table .How do we do it to an external table?
    Thanks,
    Manjula

    Hello Manjula,
    Is it possible for you to spare sometime to list down the steps to be followed for creating External Table using flat file *.txt?
    I am trying to do it but not getting through it.
    Thanks in Advance,
    Ripesh

  • Error while creating oracle external table

    I am trying to create an external table with the following syntax. WhenI have executed this statement in my server which running in my machine, it is working fine. Whine I try to run the same statement on different server, it is giving the below error. I have verified the grants on both the schemas, they are simillar.
    create table ext_ORGBASIC_CLIENT1(
    Serial_Number varchar2(1000),
    Add_Edit_Organization varchar2(1000),
    Parent_Organization varchar2(1000),
    Organization_Code varchar2(1000),
    Organization_Name varchar2(1000),
    Legal_Entity varchar2(1000),
    Active varchar2(1000),
    Require_Entity_Use__as_Matchin varchar2(1000),
    Pass_On_Tax_On_Tax_To_Customer varchar2(1000),
    Allow_Exemption_Without_Receiv varchar2(1000),
    Entiy_Use_Code_Association varchar2(1000),
    Tax_Calculation_Type_Code varchar2(1000),
    Transaction_Type_Code varchar2(1000),
    Transaction_Source_Code varchar2(1000),
    Taxware_Delivery_Terms_Code varchar2(1000),
    Taxware_Mode_of_Transport_Code varchar2(1000),
    Debit_Credit_Indicator varchar2(1000),
    Discount_Type_Code varchar2(1000),
    Place_of_Principal_Negotiation varchar2(1000),
    Quantity_Unit_of_Measure_Code varchar2(1000),
    Good_Service_Category_Code varchar2(1000),
    Tax_Rate_Of_Geo_Code_To_Be_Aut varchar2(1000))
    organization external
    ( type oracle_loader default directory EXT_TAB_DIR
    access parameters ( records delimited by newline characterset US7ASCII load
    when (serial_number != 'Number' and serial_number != '#')
    badfile 'EXT_TAB_DIR':'CLIENT1.bad'
    logfile 'EXT_TAB_DIR':'CLIENT1.log'
    fields terminated by ',' optionally enclosed by '"' lrtrim missing field values are null
    reject rows with all null fields )
    location ('C_CLIENT1_TXWR_FS1_TWEBULK_ORGBASIC_1_1_20091126102230_001_CSV.csv') )
    parallel reject limit unlimited
    while querieng from the table I am getting the below error
    select * from ext_orgbasic_client1;
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04001: error opening file CLIENT1.log
    ORA-06512: at "SYS.ORACLE_LOADER", line 19

    I try to run the same statement on different server, it is giving the below errorSame OS name & version?
    Same Oracle version to 4 decimal places?
    Same OS file permissions?
    Same OS pathnames?

  • Error in creating the external table?

    SQL> create table oldemp (
    2 empno number(5),
    3 ename varchar2(20))
    4 organization external
    5 (type oracle_loader
    6 default directory emp_dir
    7 access parameters
    8 (records delimited by newline
    9 badfile 'bad_emp'
    10 logfile 'log_emp'
    11 fields terminated by ','
    12 (empno number(5),
    13 ename varchar2(20))
    14 LOCATION ('c:\EMP1.TXT'))
    15 PARALLEL 5
    16 REJECT LIMIT 200;
    PARALLEL 5
    ERROR at line 15:
    ORA-30648: missing LOCATION keyword
    SQL>

    error when inserting into the external table.
    Following is the error:
    SQL> create table oldemp (
    2 empno number(5),ename varchar2(20))
    3 organization external
    4 (type oracle_loader
    5 default directory emp_dir1
    6 access parameters
    7 (records delimited by newline
    8 badfile 'bad_emp'
    9 logfile 'log_emp'
    10 fields terminated by ','
    11 (empno number(5),
    12 ename varchar2(20)))
    13 LOCATION('EMP2.lst'))
    14 PARALLEL 5
    15 REJECT LIMIT 200;
    Table created.
    SQL> insert into oldemp values(100,'raj');
    insert into oldemp values(100,'raj')
    ERROR at line 1:
    ORA-30657: operation not supported on external organized table

  • ORA-0092 error when trying to create an external table

    For some reason, I always received the following error whenever I attempt to create an
    External table.
    ORA-0092:missing or invalid option
    This is the code that I am using in SQL Plus:
    SQL> create table products (
    2 product_no number,
    3 description varchar2(100),
    4 price varchar2(20)
    5 )
    6 organization EXTERNAL (
    7 type oracle_loader
    8 default directory PRODUCT_DIR
    9 access parameters
    10 ( records delimited by newline
    11 badfile 'products.bad'
    12 logfile 'products.log'
    13 fields terminated by ','
    14 )
    15 location ('products.csv')
    16 )
    17 reject ('products.csv')
    18 )
    19 reject limit unlimited
    20 /
    organization EXTERNAL (
    ERROR at line 6:
    ORA-00922: missing or invalid option
    This is the statement that I used to create my directory:
    CREATE DIRECTORY PRODUCT_DIR AS 'd:\products';
    Does that directory have to be an actual physical directory in UNIX for this to work, or
    will it be looking for a products folder in the d drive of my Windows NT machine?

    The directory should exist on the server where Oracle is installed. Since clients can be more than one on various operating
    systems, It can not be a directory on the client (since that would not be valid for other clients or even the same user
    connecting from a different machine).
    Did you install the Standard Edition of Oracle or the Enterprise Edition of Oracle server on your machine?
    External Tables option may not be available on Standard Edition.
    I have Oracle9i Rel 2 installed on my server and the external tables works fine for me.

  • Error while querying the external tables in 9i

    i am working on a project on Oracle 9iR2 on Linux AS 3.0, i am in urgent need to port my data in text files for using in the DB
    I have created an external table using the following script. While executing a query it gives the following error. Pls Hlp
    create table ap_info_ex
         (ser_no number(7),
         no_of_sps number(1),
         hpy_liq_mm number(2),
         rmp_rnk_cd number(1),
         ir number(3),
         dps_flg varchar2(1))
    organization external
    (type oracle_loader
         default directory aps_jul
         access parameters (records delimited by newline
                        fields terminated by ","
                        (sno char,
                        no_sps char,
                        hpy_mm char,
                        rmp_rnk char,
                        ir char,
                        dpsflg char))
    location ('info.txt'));
    Table has been created successfully
    but when i execute a query say
    select * from ap_info_ex;
    THIS IS THE ERROR MESSAGE I AM GETTING
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: unable to open log file AP_INFO_EX_6151.log
    OS error Permission denied
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1
    hope you would help me. i am greateful for that.

    Arun,
    Here are the things you could do.
    1. You may want to specify a logfile in your access parameters using the command 'logfile'.
    For example,
    logfile 'info.log'. You could create the file in advance and provide appropriate permissions to the operating system user(In unix, I use the commands 'touch' and 'chmod').
    2. You could specify the command
    'NOLOGFILE' in your access parameters.
    3. Provide permissions for the user to create files in the folder associated with the directory object 'aps_jul'.

  • Error while creating the DWH tables using DAC

    Hi,
    I am getting error while creating the DWH tables using DAC. I have created a ODBC DSN using merant driver with DAC repository DB credentials and the test connection is successful. And while creating the tables i gave the olap dw credentials and the DSN name which i created earlier. But it throws the error as below:
    Please find the below mentioned error message
    =====================================
    STD OUTPUT
    =====================================
    CREATING SIEBEL DATABASE OBJECTS
    F:\DAC\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u infdomain /p ******* /c DB_DAC /G "SSE_ROLE" /f F:\DAC\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b "" /K "" /X "" /W N
    Error while importing Siebel database schema.
    =====================================
    ERROR OUTPUT
    =====================================
    Siebel Enterprise Applications ODBC DDL Import Utility, Version 7.7 [18030] ENU
    Copyright (c) 2001 Siebel Systems, Inc. All rights reserved.
    This software is the property of Siebel Systems, Inc., 2207 Bridgepointe Parkway,
    San Mateo, CA 94404.
    User agrees that any use of this software is governed by: (1) the applicable
    user limitations and other terms and conditions of the license agreement which
    has been entered into with Siebel Systems or its authorized distributors; and
    (2) the proprietary and restricted rights notices included in this software.
    WARNING: THIS COMPUTER PROGRAM IS PROTECTED BY U.S. AND INTERNATIONAL LAW.
    UNAUTHORIZED REPRODUCTION, DISTRIBUTION OR USE OF THIS PROGRAM, OR ANY PORTION
    OF IT, MAY RESULT IN SEVERE CIVIL AND CRIMINAL PENALTIES, AND WILL BE
    PROSECUTED TO THE MAXIMUM EXTENT POSSIBLE UNDER THE LAW.
    If you have received this software in error, please notify Siebel Systems
    immediately at (650) 295-5000.
    F:\DAC\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u infdomain /p ***** /c DB_DAC /G SSE_ROLE /f F:\DAC\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b /K /X /W N
    Connecting to the database...
    28000: [DataDirect][ODBC Oracle driver][Oracle]ORA-01017: invalid username/password; logon denied
    Unable to connect to the database...
    any help is appreciated.
    Thanks,
    RM

    The fact that you are getting an "ORA-01017: invalid username/password; logon denied" message indicates that you are at least talking to the database.
    The log shows that username "infdomain" is being used. Can you double check the username and password you have in DAC in a SQL*Plus/SQL Developer session?
    Please mark if useful/helpful,
    Andy.

  • Error while creating data warehouse tables.

    Hi,
    I am getting an error while creating data warehouse tables.
    I am using OBIA 7.9.5.
    The contents of the generate_clt log are as below.
    >>>>>>>>>>>>>>>>>>>>>>>>>>
    Schema will be created from the following containers:
    Oracle 11.5.10
    Universal
    Conflict(s) between containers:
    Table Name : W_BOM_ITEM_FS
    Column Name: INTEGRATION_ID.
    The column properties that are different :[keyTypeCode]
    Success!
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    There are two rows in the DAC repository schema for the column and the table.
    The w_etl_table_col.KEY_TYPE_CD value for DW application is UNKNOWN and for the ORA_11i application it is NULL.
    Could this be the cause of the issue? If yes, why could the values be different and how to resolve this?
    If not, then what could be the problem?
    Any responses will be appreciated.
    Thanks and regards,
    Manoj.

    Strange. The OBIA 7.9.5 Installation and Configuration Guide says the following:
    4.3.4.3 Create ODBC Database Connections
    Note: You must use the Oracle Merant ODBC driver to create the ODBC connections. The Oracle Merant ODBC driver is installed by the Oracle Business Intelligence Applications installer. Therefore, you will need to create the ODBC connections after you have run the Oracle Business Intelligence Applications installer and have installed the DAC Client.
    Several other users are getting the same message creating DW tables.

  • Error while creating publisher change tables in CDC

    Hi,
    I am implementing Change Data Capture. I got getting following error while creating publisher change tables in Staging database. My database version is 10.2.0.2.0 .
    I appreciate your help.
    ERROR at line 1:
    ORA-29540: class oracle/CDC/PublishApi does not exist
    ORA-06512: at "SYS.DBMS_CDC_PUBLISH", line 611
    ORA-06512: at line 2
    Thanks,
    Venkat.

    This problem got fixed when I ran below script!!
    @$ORACLE_HOME/rdbms/admin/initcdc.sql;

  • Create multiple external tables from same flat file ?

    using oracle 10g
    currently create many external tables like so..
    CREATE TABLE "XT_UNITS"
    "Q1_2012" VARCHAR2(25 BYTE),
    "Q2_2012" VARCHAR2(25 BYTE),
    "Q3_2012" VARCHAR2(25 BYTE),
    "Q4_2012" VARCHAR2(25 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY "XE_FILES" ACCESS PARAMETERS ( records delimited BY newline
    skip 1 fields terminated BY ',' OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES
    ARE NULL ) LOCATION ( 'xtunits.csv' ))
    is there any way I can use 1 flat file (csv) to populate many external tables ?
    maybe by section ?

    Jay wrote:
    using oracle 10g
    currently create many external tables like so..
    CREATE TABLE "XT_UNITS"
    "Q1_2012" VARCHAR2(25 BYTE),
    "Q2_2012" VARCHAR2(25 BYTE),
    "Q3_2012" VARCHAR2(25 BYTE),
    "Q4_2012" VARCHAR2(25 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY "XE_FILES" ACCESS PARAMETERS ( records delimited BY newline
    skip 1 fields terminated BY ',' OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES
    ARE NULL ) LOCATION ( 'xtunits.csv' ))
    is there any way I can use 1 flat file (csv) to populate many external tables ?
    maybe by section ?Not a logical question.
    An external table definition relates to one or more files.
    You could probably create multiple externable table definitions to access the same file(s), but you may end up with some operating system file locking issues if you're not careful, and to be honest why would you need to do that?

  • Can we create single External Table for multiple files?

    HI,
    Can we create External table for multiple files? Could anyone please explain it.
    Thanks and regards
    Gowtham Sen.

    to merge 16 files having same structureWell, if files have the same structure, as per the reading of the example from the following documentation, you can create one external table for all your files :
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#i1007480
    Nicolas.

  • How to move the data of a table from sqlplus to XML file

    Hi,
    Could you pls guide me how to move the data of a table from sqlplus to XML file.
    i want to do it from sqlplus rather than toad.pls help
    Thanks

    Oh..I'm in 9i.
    Try this out..and let me know.
    DECLARE
    CTX DBMS_XMLGEN.CTXHANDLE ;
    XML CLOB ;
    F UTL_FILE.FILE_TYPE;
    XMLC VARCHAR2(32767);
    BEGIN
    CTX := DBMS_XMLGEN.NEWCONTEXT('SELECT * FROM department1 ') ;
    XML := DBMS_XMLGEN.GETXML(CTX) ;
    XMLC:=TO_CHAR(XML);
    SHOW_ENVELOPE(XMLC);
    F := UTL_FILE.FOPEN('ATTACH_FILES','DEPT.XML', 'W');
    UTL_FILE.PUT_LINE(F,XML);
    UTL_FILE.FCLOSE(F);
    END ;
    Good luck!!!
    Bhagat
    null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Create a External Table in Oracle 10g:== ERROR: KUP-01005

    Hello.
    I have a problem working with external tables, hope someone can help me with this problem. Thanks.
    This is the code of the external table
    ========================
    CREATE TABLE SIAFI.RNP_IDS
    NUMERO_ID VARCHAR2(30 BYTE),
    PRIMER_NOMBRE VARCHAR2(300 BYTE),
    SEGUNDO_NOMBRE VARCHAR2(300 BYTE),
    APELLIDO_PATERNO VARCHAR2(300 BYTE),
    APELLIDO_MATERNO VARCHAR2(300 BYTE),
    DEPARTAMENTO VARCHAR2(300 BYTE),
    CORRELATIVO VARCHAR2(300 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY SEG_DIRECTORIO
    ACCESS PARAMETERS
    ( records delimited by NEWLINE
    badfile SEG_DIRECTORIO:'censo.bad'
    logfile SEG_DIRECTORIO:'censo.log'
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM
    REJECT ROWS WITH ALL NULL FIELDS
    (NUMERO_ID VARCHAR(30) NULLIF NUMERO_ID=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    PRIMER_NOMBRE VARCHAR(300) NULLIF PRIMER_NOMBRE=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    SEGUNDO_NOMBRE VARCHAR(300) NULLIF SEGUNDO_NOMBRE=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    APELLIDO_PATERNO VARCHAR(300) NULLIF APELLIDO_PATERNO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    APELLIDO_MATERNO VARCHAR(300) NULLIF APELLIDO_MATERNO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    DEPARTAMENTO VARCHAR(300) NULLIF DEPARTAMENTO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    CORRELATIVO VARCHAR(300) NULLIF CORRELATIVO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    LOCATION (SEG_DIRECTORIO:'censo.txt')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;
    When executing the stament select from RNP_IDS* it returns the following error message:
    ===========================================================
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "terminated": expecting one of: "and, comma, defaultif, not, nullif, or, )"
    KUP-01007: at line 6 column 56
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    ORA-06512: at line 1
    This is the example of the file I'm using:
    ==========================
    "0","DOUGLAS","AUGUSTO","ABBOTT","","1","3672097"
    "0101190600010","MARIA","URBANA","GOMEZ","URBINA","2","1949122"
    "0101190600076","ENRIQUETA","","GARCIA","","2","1162025"
    "0101190800106","LUCILA","","FLORES","","2","1658013"

    Hi
    Here we go...
    I reduced the 300 length of varcahr t o30 for testing purpose...
    SQL> CREATE TABLE RNP_IDS
    2 (
    3 NUMERO_ID VARCHAR2(30),
    4 PRIMER_NOMBRE VARCHAR2(30),
    5 SEGUNDO_NOMBRE VARCHAR2(30),
    6 APELLIDO_PATERNO VARCHAR2(30),
    7 APELLIDO_MATERNO VARCHAR2(30),
    8 DEPARTAMENTO VARCHAR2(30),
    9 CORRELATIVO VARCHAR2(30)
    10 )
    11 ORGANIZATION EXTERNAL
    12 ( TYPE ORACLE_LOADER
    13 DEFAULT DIRECTORY LOG
    14 ACCESS PARAMETERS
    15 ( records delimited by NEWLINE
    16 badfile LOG:'censo.bad'
    17 logfile LOg:'censo.log'
    18 FIELDS TERMINATED BY ','
    19 OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM
    20 REJECT ROWS WITH ALL NULL FIELDS
    21 (
    22 NUMERO_ID ,
    23 PRIMER_NOMBRE ,
    24 SEGUNDO_NOMBRE ,
    25 APELLIDO_PATERNO,
    26 APELLIDO_MATERNO ,
    27 DEPARTAMENTO,
    28 CORRELATIVO
    29 )
    30 )
    31 LOCATION ('sample1.txt')
    32 )
    33 REJECT LIMIT UNLIMITED
    34 NOPARALLEL
    35 NOMONITORING;
    Table created.
    SQL> desc rnp_ids
    Name Null? Type
    NUMERO_ID VARCHAR2(30)
    PRIMER_NOMBRE VARCHAR2(30)
    SEGUNDO_NOMBRE VARCHAR2(30)
    APELLIDO_PATERNO VARCHAR2(30)
    APELLIDO_MATERNO VARCHAR2(30)
    DEPARTAMENTO VARCHAR2(30)
    CORRELATIVO VARCHAR2(30)
    SQL> select numero_id from rnp_ids;
    NUMERO_ID
    0
    0101190600010
    0101190600076
    0101190800106
    - Pavan Kumar N

  • External table refere to a file in subfolder location

    Hi,
    I'm trying to link a external table to a file in a subfolder in a file location in OWB. Is this possible or do i need to make a new connectior for every folder i want to use for an external file?
    The server is an AIX server. So for example:
    - Location1 is refering to /POS
    But i want to use a file located in /POS/BLA
    regards,
    Osman
    Edited by: Ossy81 on Nov 5, 2009 3:39 PM

    Yes. Here the input from user guide:
    Describing the Flat File Module
    Type a name and an optional description for the flat file module.
    Recall that you create a module for each folder in your file system from which you want to sample existing files or to which you want to create new files. Therefore,
    consider naming the module based on the folder name. Each file module corresponds to one folder in the file system.
    For example, to import flat files from c:\folder1 and a subfolder such as c:\folder1\subfolder,create two file modules such as C_FOLDER1 and C_FODLER1_SUBFOLDER.

  • Error while creating Global temp table

    Hi,
    I am very new to PL/SQL so please excuse my question. I have the below query . I have to get a count between the source table and various target tables. I am creating a global temp table to store the counts. I am getting the below error for my following query :
    Thanks for the help,
    Petronas
    ----Query----
    set serveroutput on
    Declare
    nm1 varchar2(200);
    nm2 varchar2(200);
    cnt1 number;
    cnt2 number;
    diff number;
    totdiff number;
    Begin
    nm1 := null;
    nm2:= null;
    cnt1:= 0;
    cnt2 := 0;
    diff := 0;
    totdiff := 0;
    create GLOBAL TEMPORARY TABLE diff ( name1 varchar(200), name2 varchar2(200), diff number);
    select count(*) into cnt1
    from users_staging;
    select count(*) into cnt2
    from PROD.users;
    nm1 := 'users_staging';
    nm2 := 'PROD.users';
    diff := cnt1 - cnt2;
    insert into diff values (nm1,nm2,diff);
    select count(*) into totdiff
    from diff
    where diff> 0 ;
    dbms_output.enable(10000);
    dbms_output.put_line('# of tables where difference is > 0 ' ||totdiff);
    end;
    Encountered the symbol "CREATE" when expecting one of the following:
    begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    <an identifier> <a double-quoted delimited-identifier>
    <a bind variable> << close current delete fetch lock insert
    open rollback savepoint set sql execute commit forall merge
    pipe

    Hi,
    "CREATE GLOBAL TEPORARY TABLE ..." is not a PL/SQL command; it is a SQL command only.
    Create the table, using that statement, before running the PL/SQL block.
    You can issue SQL statements from within PL/SQL using the EXECUTE IMMEDIATE command, but this is rarely a good idea.
    I assume the PL/SQL code is meant to create the table and then populate it.
    You should split those into two separate pieces of code. You'll only want to create the table once, no matter how many times you use it. I assume you'll want to populate it the same way many times. Remember, the "TEMPORARY" in "GLOBAL TEMPORARY TABLE" refers to the data, not the table. When you end a transaction (or a session, depending on whther you want "ON COMMIT DELETE ROWS" or "ON COMMIT PRESERVE ROWS"), the data disappears, but the now-empty stays, ready to be populated for the next transaction (or session).
    Edited by: Frank Kulash on Aug 4, 2010 2:25 PM

Maybe you are looking for

  • I have just updated to 7.0.1 and suddenly my search results won't open in a new tab

    I have just updated to 7.0.1 and suddenly my search results won't open in a new tab (let alone a new window - something I much preferred in the past) although this option is checked. I even installed Tab Utilities Light Options - all of it's options

  • Exit code of -337

    Hi All, While starting up netweaver I get the following error in dev_dispatcher. THe following is the trace file: trc file: "C:\usr\sap\J2E\JC01\work\dev_dispatcher", trc level: 1, release: "700" node name   : ID11241900 pid         : 3884 system nam

  • How do I reject or delete "Soft fail" emails?

    Getting spam messages which are spoofing our own internal email domain.  Exchange is aware of this and marks the message as a Soft Fail.  But how do I stop the message from being delivered into the mailbox? As I understand Sender ID filtering will on

  • How do I get my old purcheses back up on my pc?

    Ok, here is the deal. I upgraded my computer from Vista to Windows 7. I lost all of the music I bought from the ITunes store, and I am trying to get it back. Someone please help me. I know I should have burned them first, but I never thought I would

  • EQ on Built-in Audio?

    Is there a way to apply an EQ setting to all audio output? (i.e. everything that comes out of my PB speakers or phone jack, not just iTunes) Perhaps some sort of alt. audio device software (like soundflower.. but w/ different powers).