External table data edit

Hi Experts...
I am trying to export data from main frame system files(.csv) by using the external tables,
my question is can I edit before loading into the external tables? if yes how/
or else wat is the best process to edit while loading from external tables to main tables?
sample code will be appreciated...

It depends on what you mean by "edit". You can do anything in a sql statment against an external table that you can against a real table. So, if by "edit" you mean things like make a column upper case, do some basic formatting etc., or even ignore some lines/columns in the file, then it should be done is the select statment from the external table.
John

Similar Messages

  • Dynamically Update External Table Data

    I loaded a data table from an external csv file. But the csv file is an output from a program that appends a new line to the csv file every couple days.
    I made a Report with the loaded data, but in a couple days when a few new lines of data appear in the csv file, I want my report to update as well.
    Is there a way to create a "Refresh Button" in my application that will load the data from the csv when pressed?
    I have oracle database 11g express with APEX 4.1.1

    Hi,
    what you describe could certainly be achieved, but it would have to be designed and built, it is not going to be provided "out of the box". I would probably go with an external table based on your file and a process that you would build would be callable from the button and this would do some sort of a merge of the external table data into your database table. Apart from being callable on demand, the process could also be made to be a scheduled process that loads the data on a regular basis, say once a day or once an hour, depending on your requirements. To use an external table it is assumed that the file will be available on the database server. If not and the file is available on only a client machine, then doing an on demand load process would still be possible, but a little more difficult.
    Andre

  • External Tables Date Error

    I get error while loading data into Oracle 11g R2 with EXTERNAL TABLES.
    error processing column DATE_M in row 1 for datafile C:\app\S\admin\orcl\dpdump\TABLE_EXT.txt
    ORA-01847: day of month must be between 1 and last day of month
    error processing column DATE_M in row 2 for datafile C:\app\S\admin\orcl\dpdump\TABLE_EXT.txt
    ORA-01843: not a valid month
    error processing column DATE_M in row 3 for datafile C:\app\S\admin\orcl\dpdump\TABLE_EXT.txt
    ORA-01843: not a valid month
    error processing column DATE_M in row 4 for datafile C:\app\S\admin\orcl\dpdump\TABLE_EXT.txt
    ORA-01847: day of month must be between 1 and last day of month
    error processing column DATE_M in row 5 for datafile C:\app\S\admin\orcl\dpdump\TABLE_EXT.txt
    ORA-01843: not a valid month
    error processing column DATE_M in row 6 for datafile C:\app\S\admin\orcl\dpdump\TABLE_EXT.txt
    ORA-01843: not a valid month
    error processing column DATE_M in row 7 for datafile C:\app\S\admin\orcl\dpdump\TABLE_EXT.txt
    ORA-01843: not a valid month
    error processing column DATE_M in row 8 for datafile C:\app\S\admin\orcl\dpdump\TABLE_EXT.txt
    ORA-01843: not a valid month
    error processing column DATE_M in row 9 for datafile C:\app\S\admin\orcl\dpdump\TABLE_EXT.txt
    ORA-01843: not a valid month
    error processing column DATE_M in row 10 for datafile C:\app\S\admin\orcl\dpdump\TABLE_EXT.txt
    ORA-01843: not a valid month-----
    CREATE TABLE TABLE_EXT
       (  "COMPANY" VARCHAR2(101),
      "COMPANY_VN" VARCHAR2(15),
      "IL" VARCHAR2(17),
      "TERMINAL" VARCHAR2(8),
      "T_NO" VARCHAR2(15),
      "NAME" VARCHAR2(108),
      "SNAME" VARCHAR2(50),
      "REF_NO" VARCHAR2(23),
      "AMOUNT" NUMBER(15,2),
      "DATE_M" DATE,
      "TIME" VARCHAR2(11),
      "TEL_NO" VARCHAR2(25),
      "ADDRESS" VARCHAR2(50)
       ORGANIZATION EXTERNAL (
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY data_pump_dir
      ACCESS PARAMETERS (
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY '|'
        MISSING FIELD VALUES ARE NULL
    COMPANY,
    COMPANY_VN,
    IL,
    TERMINAL,
    T_NO,
    NAME,
    SNAME,
    REF_NO,
    AMOUNT decimal  ,
    DATE_M CHAR  date_format DATE mask "dd.mm.yyyy" ,
    TIME,
    TEL_NO,
    ADDRESS
      LOCATION ('TABLE_EXT.txt')
    REJECT LIMIT 10------
    Sample Data:
    CITY HOSPITAL|04680072124|CITY|00614860|47746244218|JOHN|WHITE|172871|420,12|21.08.2011|14:26|0806422627784|06
    CITY HOSPITAL|04680072124|CITY|00614847|14274017676|BRAD|BROWN|448127|810,00|22.08.2011|11:04|0806427488476|06
    CITY HOSPITAL|04680072124|CITY|00614842|16218778886|PETER|BALSON|862626|12,00|24.08.2011|14:16|0806062177008|06
    CITY HOSPITAL|04680072124|CITY|00614846|14607666866|GEORGE|LOUIS|688811|40,10|24.08.2011|08:48|0806424172468|06
    CITY HOSPITAL|04680072124|CITY|00614846|14607666866|GEORGE|LOUIS|460481|42,64|24.08.2011|08:47|0806424172468|06
    CITY HOSPITAL|04680072124|CITY|00614860|18460662462|JR|TEPE|404622|44,16|22.04.2011|20:08|0806446446866|06
    CITY HOSPITAL|04680072124|CITY|00614840|47207688618|BARRY|HRAN|402886|42,40|27.08.2011|11:12|0806478768007|06
    CITY HOSPITAL|04680072124|CITY|00614847|42161048612|TOM|HIGGS|148640|12,00|06.06.2011|08:18|0806068076700|06
    CITY HOSPITAL|04680072124|CITY|00614846|42161048612|TOM|HIGGS|208847|12,00|06.06.2011|08:46|0806068076700|06-----
    NLS_DATE_FORMAT : DD/MM/RRRR-----
    NOTE:
    I tried :
    TARIH CHAR date_format DATE mask "DD/MM/RRRR" , same error.
    Edited by: 904386 on Jan 24, 2012 6:42 AM

    I have no experience with external tables but my understanding is that they are described the same was as you would describe a file to be loaded by SQL Loader. When ever I create a sql loader control file to load a date column I use syntax like this:
    DATE_M                                             "TO_DATE(:DATE_M,'dd.mm.yyyy')",Not sure if that will work for external tables or not.

  • Create external table on a CSV file with a variable number of delimiters

    Hi experts,
    I was wondering what the best approach for the following issue.
    I'm trying to create an external table on a file which has in each record (on a new line 'RECORDS DELIMITED BY NEWLINE') a variabel number of delimiters. By example my delimiter is a comma , in the first record I have 100 comma's in the second only 60, the next 80 etc.etc.
    Is there a way to create a external table on this file?
    Thanks in advance.

    alter the source is no option, unfortunalty. But is suggested there would be a sensible workway to handle it. An to solve it I want to pivot i, but first I think I need to have the file in Oracle through a external table.
    Edited by: Jonathan Wisgerhof on Mar 31, 2009 12:21 PM

  • How to Authorize external table users in OBIEE 11g

    Hi All,
    I have created Session System Variables and i am Using External table Data level Authentication and successfully external table Authentication is working.
    My question is i want to Authorize this Extrenal table users in presentation services.e.g. I want to assign some dashboards or Reports to users.
    In 10g when u login with the external table users automatically users will be created in Answers and used to assign this to webcat group.
    In 11g how to achieve this???
    Reply ASAP...
    Thanks and Regards
    Kiran Kumar
    07795980891.

    Hi Kiran,
    Check this link.
    http://www.rittmanmead.com/2010/11/oracle-bi-11g-active-directory-security-using-init-blocks-variables-10g-style/

  • Accessing The External Table using UIAPI and DIAPI

    Hi  Every One,
    can any one tell me about , can we access the external table data  that is created by using sql query externally using UIApi and DIAPI
    Regards
    Srinivas

    Hi,
    technically is it possible, but all inserts and updates have to be through query.
    Note, that when you create tables from sdk, you can set more informations about fields than in sql query manager (for example subtype) - so you may have problem in binding data to matrix for example. So if you have table externally, you may work with, but this isn`t allowed by SAP (and I think that this case may be dangerous if you acces it in sdk). If you need to acces it on sql server side (own numbering, some stored procedure, ..) it will works safer, but it is not allowed as well.
    Petr

  • External table: How to load data from a fixed format UTF8 external file

    Hi Experts,
    I am trying to read data from a fixed format UTF8 external file in to a external table. The file has non-ascii characters, and the presence of the non-ascii characters causes the data to be positioned incorrectly in the external table.
    The following is the content's of the file:
    20100423094529000000I1 ABÄCDE 1 000004
    20100423094529000000I2 OMS Crew 2 2 000004
    20100423094529000000I3 OMS Crew 3 3 000004
    20100423094529000000I4 OMS Crew 4 4 000004
    20100423094529000000I5 OMS Crew 5 5 000004
    20100423094529000000I6 OMS Crew 6 6 000004
    20100423094529000000I7 Mobile Crew 7 7 000004
    20100423094529000000I8 Mobile Crew 8 8 000004
    The structure of the data is as follows:
    Name Type Start End Length
    UPDATE_DTTM CHAR 1 20 20
    CHANGE_TYPE_CD CHAR 21 21 1
    CREW_CD CHAR 22 37 16
    CREW_DESCR CHAR 38 97 60
    CREW_ID CHAR 98 113 16
    UDF1_CD CHAR 114 143 30
    UDF1_DESCR CHAR 144 203 60
    UDF2_CD CHAR 204 233 30
    DATA_SOURCE_IND CHAR 294 299 6
    UDF2_DESCR CHAR 234 293 60
    I create the external table as follows:
    CREATE TABLE "D_CREW_EXT"
    "UPDATE_DTTM" CHAR(20 BYTE),
    "CHANGE_TYPE_CD" CHAR(1 BYTE),
    "CREW_CD" CHAR(16 BYTE),
    "CREW_DESCR" CHAR(60 BYTE),
    "CREW_ID" CHAR(16 BYTE),
    "UDF1_CD" CHAR(30 BYTE),
    "UDF1_DESCR" CHAR(60 BYTE),
    "UDF2_CD" CHAR(30 BYTE),
    "DATA_SOURCE_IND" CHAR(6 BYTE),
    "UDF2_DESCR" CHAR(60 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY "TMP"
    ACCESS PARAMETERS ( RECORDS DELIMITED BY NEWLINE
    CHARACTERSET UTF8
    STRING SIZES ARE IN BYTES
    NOBADFILE NODISCARDFILE NOLOGFILE FIELDS NOTRIM
    ( "UPDATE_DTTM" POSITION (1:20) CHAR(20),
    "CHANGE_TYPE_CD" POSITION (21:21) CHAR(1),
    "CREW_CD" POSITION (22:37) CHAR(16),
    "CREW_DESCR" POSITION (38:97) CHAR(60),
    "CREW_ID" POSITION (98:113) CHAR(16),
    "UDF1_CD" POSITION (114:143) CHAR(30),
    "UDF1_DESCR" POSITION (144:203) CHAR(60),
    "UDF2_CD" POSITION (204:233) CHAR(30),
    "DATA_SOURCE_IND" POSITION (294:299) CHAR(6),
    "UDF2_DESCR" POSITION (234:293) CHAR(60) )
    ) LOCATION ( 'D_CREW_EXT.DAT' )
    REJECT LIMIT UNLIMITED;
    Check the result in database:
    select * from D_CREW_EXT;
    I found the first row is incorrect. For each non-ascii character,the fields to the right of the non-ascii character are off by 1 character,meaning that the data is moved 1 character to the right.
    Then I tried to use the option STRING SIZES ARE IN CHARACTERS instead of STRING SIZES ARE IN BYTES, it doesn't work either.
    The database version is 11.1.0.6.
    Edited by: yuan on May 21, 2010 2:43 AM

    Hi,
    I changed the BYTE in the create table part to CHAR, it still doesn't work. The result is the same. I think the problem is in ACCESS PARAMETERS.
    Any other suggestion?

  • Problem while selecting data from external tables

    Hi All,
    I am facing a problem with external tabels. I have created an external table
    create table ext_org_table
    ( id varchar2(10)
    , name varchar2(100)
    ,id_parent varchar2(10)
    ,name_parent varchar2(100))
    organization external
    ( type oracle_loader
    default directory MYDIR
    access parameters
    records delimited by newline
         nologfile
         nobadfile
    fields terminated by ','
    missing field values are null
    location ('Orgdata.csv')
    reject limit unlimited;
    The problem is that when i give select * from ext_org_table , i get following error
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Orgdata.csv in MYDIR not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    ORA-06512: at line 1
    Now , i have file Orgdata.csv in the specified directory.
    I have created directory in oracle using create directory command.
    I have granted read,write permission on the directory to user.
    I have given all read,write and execute permissions to folder where my files resides.My file resides in /appl/home/kk
    Now i don't understand why it is giving error file in Mydir not found.
    Kindly suggest.
    Regards
    Krish

    Hi,
    You are obviously doing someting wrong.
    May be the direcotry is not present or may be the file is not rpesent in the directory.
    I just tried ths
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
    Connected as SYS
    create directory mydir as 'c:\csv';
    grant read,write on directory mydir to scott;From Scott
    create table ext_org_table
    ( id varchar2(10)
    , name varchar2(100)
    ,id_parent varchar2(10)
    ,name_parent varchar2(100))
    organization external
    ( type oracle_loader
    default directory MYDIR
    access parameters
    records delimited by newline
    nologfile
    nobadfile
    fields terminated by ','
    missing field values are null
    location ('Orgdata.csv')
    reject limit unlimited;
    select * from ext_org_table;Ofcourse i made up some dummy data to test and its all OK.
    again,
    You may want to check if
    1) If the directory exists (select * from all_directories where directory_name='MYDIR');
    2) If the user has the read/write permissions on that directory
    3) If the file orgdata exists in that directory.
    Regards,
    Bhushan

  • Use of External tables to load XML data.

    Hi,
    I have used external table definitions to load various XML files to the database, usually splitting the XML into seperate records - 1 per major element tag, and using PL/SQL to parse out a primary key to store in a relational table with all of the XML relevant to that primary key value stored as an XMLTYPE coumn in a row of the table. This has worked fine for XML with a single major entity (element tag) .
    However, I now have an XML file that contains two "major" elements (both children of the root) that I would like to split out and store in seperate tables.
    The XML file is of the following basic format:-
    <drugs>
    <drug>drug 1...</drug>
    <drug>drug 2...</drug>
    <partners>
    <partner>partner 1</partner>
    <partner>partner 2</partner>
    </partners>
    </drugs>
    The problem is there are around 18000 elements of the first type, followed by several thousand of the 2nd type. I can create two seperate external tables - one for each element type, but how do I get the external table for the 2nd to ignore all the elements of the first type? My external table definition is :-
    CREATE TABLE DRUGBANK_OWNER.DRUGBANK_PARTNERS_XML_EXTERNAL
    DRUGBANK_XML CLOB
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY DRUGBANK_DIR
    ACCESS PARAMETERS
    ( records delimited by "</partner>" SKIP 100000
    characterset al32utf8
    badfile extlogs:'drugbank_partners_xml.bad'
    logfile extlogs:'drugbank_partners_xml.log'
    discardfile extlogs:'drugbank_partners_xml.dis'
    READSIZE 52428800
    fields
    drugbank_xml CHAR(50000000) terminated by '</partners>'
    LOCATION (DRUGBANK_DIR:'drugbank.xml')
    REJECT LIMIT UNLIMITED
    PARALLEL ( DEGREE 8 INSTANCES 1 )
    NOMONITORING;
    The problem is that before the first <partners> element the 1800 or so <drugs> elements cause a data cartrdige error:-
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-29400: data cartridge error
    KUP-04020: found record longer than buffer size supported, 52428800
    This happens regardless of the value of the SKIP or the size of the drugbank_xml field.
    I have tried using an OR on the "records delimited by" access parameter, to 'delimit by "</partner>" OR "</drug>"', with the intention of filtering out the <drug> elements but this leads to a syntax error.
    Anyone ever tried anything similar and got it to work?
    Any other suggestions?
    Thanks,
    Sid.

    No, the content inside quotes is spanned across multiple lines....there are line breaks after every html tag.
    "What's the error message you are getting?"
    Iam not getting any error while selecting from external table , but I am getting tose rows in BAD file and log file has the following entries
    KUP-04021: field formatting error for field TKBS_DSCN
    KUP-04036: second enclosing delimiter not found
    Message was edited by:
    user627610

  • How to write data to text file using external tables

    can anybody tell how to write data to text file using external tables concept?

    Hi,
    Using external table u can load the data in your local table in database,
    then using your local db table and UTL_FILE pacakge u can wrrite data to text file
    external table
    ~~~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2153251
    UTL_FILE
    ~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#sthref14093
    Message was edited by:
    Nicloei W
    Message was edited by:
    Nicloei W

  • ORA-01843: not a valid month, external table select fails on date column

    Hi,
    I created an external table as follows:
    CREATE OR REPLACE DIRECTORY sales_feeds AS '/backup/oracle/feeds';
    Directory created.
    CREATE TABLE salesfeed_external_table
              PROD_ID               NUMBER
            , CUST_ID               NUMBER
            , TIME_ID               DATE
            , CHANNEL_ID            NUMBER
            , PROMO_ID              NUMBER
            , QUANTITY_SOLD         NUMBER(10,2)
            , AMOUNT_SOLD           NUMBER(10,2)
    ORGANIZATION EXTERNAL
            TYPE ORACLE_LOADER
            DEFAULT DIRECTORY sales_feeds
            ACCESS PARAMETERS
                    RECORDS DELIMITED BY newline
                    FIELDS TERMINATED BY ','
            LOCATION ('salesfeed.dat')
    REJECT LIMIT 0
    Table created.I then create that external flat file salesfeed.dat as folows
    set echo off
    set feedback off
    set linesize 100
    set pagesize 0
    set head off
    set sqlprompt ''
    set trimspool on
    spool on
    spool /backup/oracle/feeds/salesfeed.dat
    select PROD_ID||','||CUST_ID||','||TIME_ID||','||CHANNEL_ID||','||PROMO_ID||','||QUANTITY_SOLD||','||AMOUNT_SOLD
    FROM salesfeed where rownum = 1;
    spool off
    exit
    cat salesfeed.dat
    18,3131,21/03/1998 00:00:00,3,999,1,2600.76Note only one row at the moment (diagonising)
    Try to read it
    select * from salesfeed_external_table
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-30653: reject limit reachedThe log shows:
    cat SALESFEED_EXTERNAL_TABLE_1302.log
    LOG file opened at 11/24/11 12:16:02
    Field Definitions for table SALESFEED_EXTERNAL_TABLE
      Record format DELIMITED BY NEWLINE
      Data in file has same endianness as the platform
      Rows with all null fields are accepted
      Fields in Data Source:
        PROD_ID                         CHAR (255)
          Terminated by ","
          Trim whitespace same as SQL Loader
        CUST_ID                         CHAR (255)
          Terminated by ","
          Trim whitespace same as SQL Loader
        TIME_ID                         CHAR (255)
          Terminated by ","
          Trim whitespace same as SQL Loader
        CHANNEL_ID                      CHAR (255)
          Terminated by ","
          Trim whitespace same as SQL Loader
        PROMO_ID                        CHAR (255)
          Terminated by ","
          Trim whitespace same as SQL Loader
        QUANTITY_SOLD                   CHAR (255)
          Terminated by ","
          Trim whitespace same as SQL Loader
        AMOUNT_SOLD                     CHAR (255)
          Terminated by ","
          Trim whitespace same as SQL Loader
    error processing column TIME_ID in row 1 for datafile /backup/oracle/feeds/salesfeed.dat
    ORA-01843: not a valid monthI checked my nls date format etc:
    select * from nls_session_parameters;
    PARAMETER                      VALUE
    NLS_LANGUAGE                   ENGLISH
    NLS_TERRITORY                  UNITED KINGDOM
    NLS_CURRENCY                   £
    NLS_ISO_CURRENCY               UNITED KINGDOM
    NLS_NUMERIC_CHARACTERS         .,
    NLS_CALENDAR                   GREGORIAN
    NLS_DATE_FORMAT                DD/MM/YYYY HH24:MI:SS
    NLS_DATE_LANGUAGE              ENGLISH
    NLS_SORT                       BINARY
    NLS_TIME_FORMAT                HH24.MI.SSXFF
    NLS_TIMESTAMP_FORMAT           DD-MON-RR HH24.MI.SSXFF
    NLS_TIME_TZ_FORMAT             HH24.MI.SSXFF TZR
    NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH24.MI.SSXFF TZR
    NLS_DUAL_CURRENCY              ¤
    NLS_COMP                       BINARY
    NLS_LENGTH_SEMANTICS           BYTE
    NLS_NCHAR_CONV_EXCP            FALSEAny ideas?
    Thanks,
    Mich
    Edited by: Mich Talebzadeh on 24-Nov-2011 04:19

    Thanks
    The following now works
    CREATE TABLE salesfeed_external_table
              PROD_ID               NUMBER
            , CUST_ID               NUMBER
            , TIME_ID               DATE
            , CHANNEL_ID            NUMBER
            , PROMO_ID              NUMBER
            , QUANTITY_SOLD         NUMBER(10,2)
            , AMOUNT_SOLD           NUMBER(10,2)
    ORGANIZATION EXTERNAL
            TYPE ORACLE_LOADER
            DEFAULT DIRECTORY sales_feeds
            ACCESS PARAMETERS
                    RECORDS DELIMITED BY newline
                    FIELDS TERMINATED BY ','
                    MISSING FIELD VALUES ARE NULL
                    (         PROD_ID
                            , CUST_ID
                            , TIME_ID DATE  'dd/mm/yyyy HH24:MI:SS'
                            , CHANNEL_ID
                            , PROMO_ID
                            , QUANTITY_SOLD
                            , AMOUNT_SOLD
            LOCATION ('salesfeed.dat')
    REJECT LIMIT 0
    select * from salesfeed_external_table;
       PROD_ID    CUST_ID TIME_ID             CHANNEL_ID   PROMO_ID QUANTITY_SOLD AMOUNT_SOLD
            18       3131 21/03/1998 00:00:00          3        999             1     2600.76Regards,
    Mich

  • External Table Creation for .dat file

    Hi,
    I have created an External Table, below is the code
    CREATE TABLE  "NFO_DATA_LOAD_STAGING_TEST1"
       (     "DATA_DISCRAPANCY" VARCHAR2(100),
         "APPLICATION_NUMBER" VARCHAR2(30),
         "BATCH_NUMBER" VARCHAR2(30),
         "AMC_ID" VARCHAR2(30),
         "TA_BRANCH" VARCHAR2(30),
         "SERVER_DATE_1" DATE,
         "SERVER_TIME_1" DATE,
         "ARN_NUMBER" VARCHAR2(30),
         "BROKER_CODE" VARCHAR2(30),
         "SUB_BROKER_CODE_1" VARCHAR2(30),
         "SUB_BROKER_CODE_2" VARCHAR2(30),
         "SUB_BROKER_CODE_3" VARCHAR2(30),
         "BROKER_ADDRESS" VARCHAR2(100),
         "FOLIO_NO" NUMBER,
         "MODE_OF_HOLDING" VARCHAR2(30),
         "STATUS" VARCHAR2(30),
         "SALUATION" VARCHAR2(30),
         "CONTACT_PERSON_NAME" VARCHAR2(30),
         "INVESTOR_NAME" VARCHAR2(30),
         "GUARDIAN_NAME" VARCHAR2(30),
         "PAN_NO" VARCHAR2(30),
         "POA_HOLDER_NAME" VARCHAR2(30),
         "KYC" VARCHAR2(30),
         "GUARDIAN_PAN_NO" VARCHAR2(30),
         "DOB_DOC" DATE,
         "GUARDIAN_RELATIONSHIP" VARCHAR2(30),
         "SALUATION_2" VARCHAR2(30),
         "DATE_OF_BIRTH" DATE,
         "SECOND_HOLDER_NAME" VARCHAR2(30),
         "GUARDIAN_NAME_2" VARCHAR2(30),
         "PAN_NO_2" VARCHAR2(30),
         "GUARDIAN_PAN_NO_2" VARCHAR2(30),
         "KYC_2" VARCHAR2(30),
         "GUARDIAN_RELATIONSHIP_2" VARCHAR2(30),
         "SALUATION_3" VARCHAR2(30),
         "DATE_OF_BIRTH_3" DATE,
         "THIRD_HOLDER_NAME" VARCHAR2(30),
         "GUARDIAN_NAME_3" VARCHAR2(30),
         "PAN_NO_3" VARCHAR2(30),
         "GUARDIAN_PAN_NO_3" VARCHAR2(30),
         "KYC_3" VARCHAR2(30),
         "GUARDIAN_RELATIONSHIP_3" VARCHAR2(30),
         "ADDRESS_LINE_1" VARCHAR2(100),
         "PINCODE" NUMBER,
         "ADDRESS_LINE_2" VARCHAR2(100),
         "CONTACT_NUMBER_O" VARCHAR2(15),
         "CITY" VARCHAR2(30),
         "CONTACT_NUMBER_R" VARCHAR2(15),
         "STATE" VARCHAR2(30),
         "MOBILE_NUMBER" VARCHAR2(15),
         "COUNTRY" VARCHAR2(30),
         "EMAIL_ID" VARCHAR2(30),
         "ALT_EMAIL_ID" VARCHAR2(30),
         "ADDRESS_LINE_1_A" VARCHAR2(100),
         "PINCODE_A" NUMBER,
         "ADDRESS_LINE_2_A" VARCHAR2(100),
         "CONTACT_NUMBER_O_A" VARCHAR2(15),
         "CITY_A" VARCHAR2(30),
         "CONTACT_NUMBER_R_A" VARCHAR2(15),
         "STATE_A" VARCHAR2(30),
         "MOBILE_NUMBER_A" VARCHAR2(15),
         "COUNTRY_A" VARCHAR2(30),
         "EMAIL_ID_A" VARCHAR2(30),
         "ALT_EMAIL_ID_A" VARCHAR2(30),
         "DESPATCH_ACCOUNT" VARCHAR2(30),
         "REDEMPTION_PAYOUT" VARCHAR2(30),
         "I_PIN_ASSIGN" VARCHAR2(30),
         "DIVIDEND_PAYOUT" VARCHAR2(30),
         "T_PIN_ASSIGN" VARCHAR2(30),
         "TO_FUND_NAME" VARCHAR2(30),
         "TO_FUND_ID" VARCHAR2(30),
         "OPTION_F_S" VARCHAR2(30),
         "MCR_NO" NUMBER,
         "BANK_NAME" VARCHAR2(30),
         "ACCOUNT_NUMBER" NUMBER,
         "BANK_BRANCH" VARCHAR2(30),
         "ACCOUNT_TYPE" VARCHAR2(30),
         "MCR_NO_P" NUMBER,
         "CHEQUE_DD_NO" NUMBER,
         "BANK_NAME_P" VARCHAR2(30),
         "PAYMENT_DATE" DATE,
         "BANK_BRANCH_P" VARCHAR2(30),
         "ADVICE_NO" NUMBER,
         "PAYMENT_TYPE_P" VARCHAR2(30),
         "AMOUNT_P" NUMBER,
         "MINIMUM_AMOUNT" NUMBER,
         "AMOUNT_WORDS" VARCHAR2(1000),
         "NOMINEE_NAME" VARCHAR2(30),
         "SALUATION_STG" VARCHAR2(30),
         "NOMINEE_DOB_STG" DATE,
         "GUARDIAN_NAME_STG" VARCHAR2(30),
         "RELATIONSHIP_STG" VARCHAR2(30),
         "ADDRESS_LINE_1_STG" VARCHAR2(100),
         "COUNTRY_STG" VARCHAR2(30),
         "ADDRESS_LINE_2_STG" VARCHAR2(100),
         "PINCODE_STG" NUMBER,
         "CITY_STG" VARCHAR2(30),
         "CONTACT_NUMBER_STG" VARCHAR2(15),
         "STATE_STG" VARCHAR2(30),
         "MOBILE_NUMBER_STG" VARCHAR2(15),
         "REMARKS_STG" VARCHAR2(100),
         "EXCEPTION_CHK_STG" CHAR(1),
         "HOLD_CHK_STG" CHAR(1),
         "PAN_STG" CHAR(1),
         "BOARD_RESOLUTION_STG" CHAR(1),
         "KYC_STG" CHAR(1),
         "MOA_STG" CHAR(1),
         "CHEQUE_STG" CHAR(1),
         "ASL_STG" CHAR(1),
         "TRUST_DEED_STG" CHAR(1),
         "PARTNERSHIP_DEED_STG" CHAR(1),
         "BYE_LAWS_STG" CHAR(1),
         "AUTO_DEBIT_STG" CHAR(1),
         "ENROLLMENT_FORM_STG" CHAR(1),
         "APPROVED" VARCHAR2(10),
         "CREATED_BY" NUMBER,
         "CREATION_DATE" DATE,
         "LAST_UPDATE_DATE" DATE,
         "LAST_UPDATED_BY" NUMBER,
         "FUND_TYPE" VARCHAR2(30)
       ORGANIZATION EXTERNAL
        ( TYPE ORACLE_LOADER
          DEFAULT DIRECTORY DUMP_DIR
          ACCESS PARAMETERS
          ( RECORDS DELIMITED BY NEWLINE
               BADFILE 'emp.bad'
                          LOGFILE 't.log_xt'               
                          FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY ' " ' LDTRIM
                          REJECT ROWS WITH ALL NULL FIELDS
                   "DATA_DISCRAPANCY" 
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "APPLICATION_NUMBER"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "BATCH_NUMBER"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "AMC_ID"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "TA_BRANCH"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "SERVER_DATE_1"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "SERVER_TIME_1"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ARN_NUMBER"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "BROKER_CODE"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "SUB_BROKER_CODE_1"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "SUB_BROKER_CODE_2"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "SUB_BROKER_CODE_3"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "BROKER_ADDRESS"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "FOLIO_NO"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "MODE_OF_HOLDING"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "STATUS"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "SALUATION"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CONTACT_PERSON_NAME"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "INVESTOR_NAME"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "GUARDIAN_NAME"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "PAN_NO"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "POA_HOLDER_NAME"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "KYC"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "GUARDIAN_PAN_NO"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "DOB_DOC"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "GUARDIAN_RELATIONSHIP"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "SALUATION_2"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "DATE_OF_BIRTH"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "SECOND_HOLDER_NAME"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "GUARDIAN_NAME_2"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "PAN_NO_2"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "GUARDIAN_PAN_NO_2"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "KYC_2"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "GUARDIAN_RELATIONSHIP_2"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "SALUATION_3"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "DATE_OF_BIRTH_3"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "THIRD_HOLDER_NAME"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "GUARDIAN_NAME_3"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "PAN_NO_3"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "GUARDIAN_PAN_NO_3"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "KYC_3"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "GUARDIAN_RELATIONSHIP_3"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ADDRESS_LINE_1"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "PINCODE"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ADDRESS_LINE_2"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CONTACT_NUMBER_O"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CITY"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CONTACT_NUMBER_R"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "STATE"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "MOBILE_NUMBER"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "COUNTRY"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "EMAIL_ID"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ALT_EMAIL_ID"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ADDRESS_LINE_1_A"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "PINCODE_A"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ADDRESS_LINE_2_A"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CONTACT_NUMBER_O_A"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CITY_A"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CONTACT_NUMBER_R_A"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "STATE_A"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "MOBILE_NUMBER_A"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "COUNTRY_A"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "EMAIL_ID_A"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ALT_EMAIL_ID_A"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "DESPATCH_ACCOUNT"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "REDEMPTION_PAYOUT"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "I_PIN_ASSIGN"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "DIVIDEND_PAYOUT"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "T_PIN_ASSIGN"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "TO_FUND_NAME"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "TO_FUND_ID"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "OPTION_F_S"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "MCR_NO"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "BANK_NAME"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ACCOUNT_NUMBER"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "BANK_BRANCH"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ACCOUNT_TYPE"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "MCR_NO_P"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CHEQUE_DD_NO"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "BANK_NAME_P"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "PAYMENT_DATE"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "BANK_BRANCH_P"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ADVICE_NO"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "PAYMENT_TYPE_P"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "AMOUNT_P"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "MINIMUM_AMOUNT"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "AMOUNT_WORDS"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "NOMINEE_NAME"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "SALUATION_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "NOMINEE_DOB_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "GUARDIAN_NAME_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "RELATIONSHIP_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ADDRESS_LINE_1_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "COUNTRY_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ADDRESS_LINE_2_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "PINCODE_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CITY_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CONTACT_NUMBER_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "STATE_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "MOBILE_NUMBER_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "REMARKS_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "EXCEPTION_CHK_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "HOLD_CHK_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "PAN_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "BOARD_RESOLUTION_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "KYC_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "MOA_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CHEQUE_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ASL_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "TRUST_DEED_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "PARTNERSHIP_DEED_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "BYE_LAWS_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "AUTO_DEBIT_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "ENROLLMENT_FORM_STG"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "APPROVED"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CREATED_BY"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "CREATION_DATE"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "LAST_UPDATE_DATE"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "LAST_UPDATED_BY"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " ' ,
                   "FUND_TYPE"
                                                             TERMINATED BY ","  OPTIONALLY ENCLOSED BY ' " '
          LOCATION
           ( 'Key_File_Report.dat'
    {code}
    while trying to select the data from external table, am facing the below error.
    {code}
    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 "identifier": expecting one of: "and, column, exit, (, ltrim, lrtrim, ldrtrim, missing, notrim, rtrim, reject" KUP-01008: the bad identifier was: LDTRIM KUP-01007: at line 4 column 77
    {code}
    can anyone suggest me how to resolve this.
    Regards,
    Sakthi.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  

    I think i found the problem:
    KUP-01008: the bad identifier was: LDTRIM KUP-01007: at line 4 column 77There is no LDTRIM. It is LDRTRIM or LRTRIM.
    this should work
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LDRTRIM{code}
    Edited by: Sven W. on Aug 27, 2010 2:59 PM -- removed the blanks in the optionally enclosed spec                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • External table error (no data showing)

    Hi Guys,
    Need some help on my external table. I have an existing external table (MA_EXT) when I select the table no data is showing and there is no error in the log file and there is no bad file. The next thing I did to check if the error is in the file is to copy the same code and just rename the external table (MA_EXT2) and it worked just fine (data is showing no changes in the code just external table name). So the next step I did was to drop and recreate the external table (MA_EXT) but the same thing happened the data is not showing and no error in log file and no bad file.
    BTW this is in 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
    Has anyone encountered this? TIA...

    eadelrosario wrote:
    Hi Guys,
    Need some help on my external table. I have an existing external table (MA_EXT) when I select the table no data is showing and there is no error in the log file and there is no bad file. The next thing I did to check if the error is in the file is to copy the same code and just rename the external table (MA_EXT2) and it worked just fine (data is showing no changes in the code just external table name). So the next step I did was to drop and recreate the external table (MA_EXT) but the same thing happened the data is not showing and no error in log file and no bad file.
    BTW this is in 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
    Has anyone encountered this? TIA...you have a mystery & we have no clues.
    Either you are correct or Oracle is correct.
    I bet Oracle is correct more often than you.
    You are free to submit a Bug Report if you are sure that Oracle is mis-behaving.

  • Error while selecting date from external table

    Hello all,
    I am getting the follwing error while selecting data from external table. Any idea why?
    SQL> CREATE TABLE SE2_EXT (SE_REF_NO VARCHAR2(255),
      2        SE_CUST_ID NUMBER(38),
      3        SE_TRAN_AMT_LCY FLOAT(126),
      4        SE_REVERSAL_MARKER VARCHAR2(255))
      5  ORGANIZATION EXTERNAL (
      6    TYPE ORACLE_LOADER
      7    DEFAULT DIRECTORY ext_tables
      8    ACCESS PARAMETERS (
      9      RECORDS DELIMITED BY NEWLINE
    10      FIELDS TERMINATED BY ','
    11      MISSING FIELD VALUES ARE NULL
    12      (
    13        country_code      CHAR(5),
    14        country_name      CHAR(50),
    15        country_language  CHAR(50)
    16      )
    17    )
    18    LOCATION ('SE2.csv')
    19  )
    20  PARALLEL 5
    21  REJECT LIMIT UNLIMITED;
    Table created.
    SQL> select * from se2_ext;
    SQL> select count(*) from se2_ext;
    select count(*) from se2_ext
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04043: table column not found in external source: SE_REF_NO
    ORA-06512: at "SYS.ORACLE_LOADER", line 19

    It would appear that you external table definition and the external data file data do not match up. Post a few input records so someone can duplicate the problem and determine the fix.
    HTH -- Mark D Powell --

  • DATE fields and LOG files  in context with external tables

    I am facing two problems when dealing with the external tables feature in Oracle 9i.
    I created an External Table with some fileds with the DATE data type . There were no issues during the creation part. But when i query the table, the DATE fields are not properly selected though the data is there in the files. Is there any ideas to deal with this ?
    My next question is regarding the log files. The contents in the log file seems to be growing when querying the external tables. Is there a way to control this behaviour?
    Suggestions / Advices on the above two issues are welcome.
    Thanks
    Lakshminarayanan

    Hi
    If you have date datatypes than:
    select
    greatest(TABCASER1.CASERRECIEVEDDATE, EVCASERS.FINALEVDATES, EVCASERS.PUBLICATIONDATE, EVCASERS.PUBLICATIONDATE, TABCASER.COMPAREACCEPDATE)
    from TABCASER, TABCASER1, EVCASERS
    where ...-- join and other conditions
    1. greatest is good enough
    2. to_date creates date dataype from string with the format of format string ('mm/dd/yyyy')
    3. decode(a, b, c, d) is a function: if a = b than return c else d. NULL means that there is no data in the cell of the table.
    6. to format the date for display use to_char function with format modell as in the to_date function.
    Ott Karesz
    http://www.trendo-kft.hu

Maybe you are looking for

  • Problems opening Captivate 5.5 after CTD

    Hi there forum, When closing a Captivate 5.5 project today, it asked if I wanted to save the file. I said yes. The procedure the save the project commenced and the Captivate progress box appeared as it was going through all its compression techniques

  • Package com.borland.jbcl.layout does not exist

    im using JBuilder X and getting this error message: package com.borland.jbcl.layout does not exist considering that JBuilder has some problem i compiled the classes using command prompt but even then the same error appeared. plz help me its part of m

  • How to open and read embedded pdf

    I have been forwarded an email to my macbook air with an attachment which containts embedded pdf's.  I cannot open or read the pdf's.  Can anyone tell me if I need to download an app to do this. Thanks.

  • WF: Object DECISION Method PROCESS - stays in status in process forever

    Dear Friend, Could you, please, give me any ideas why Workflow Task based on business objects/method DECISION->PROCESS stays in status in process? It happens after upgrade to ERP2005 from 4.6c. In old version it works perfectly. Thanks a lot for help

  • I have one app that just randomly started crashing and now will not open

    I have an app- Game of war, that I liked to play. well one day it just crashed. I did all sorts of things; reset my warnings, deleted it, rebooted, even upgraded to the newest firmware and it still wont work. it just opens to a crash report screen, b