While loading through External Tables, Japanese characters wrong load

Hi all,
I am loading a text file through External Tables. While loading, japanese characters are loading as junk characters. In text file, the characters are showing correctly.
My spool file
SET ECHO OFF
SET VERIFY OFF
SET Heading OFF
SET LINESIZE 600
SET NEWPAGE NONE
SET PAGESIZE 100
SET feed off
set trimspool on
spool c:\SYS_LOC_LOGIC.txt
select CAR_MODEL_CD||',' || MAKER_CODE||',' || CAR_MODEL_NAME_CD||',' || TYPE_SPECIFY_NO||',' ||
     CATEGORY_CLASS_NO||',' || SPECIFICATION||',' || DOOR_NUMBER||',' || RECOGNITION_TYPE||',' ||
     TO_CHAR(SALES_START,'YYYY-MM-DD') ||',' || TO_CHAR(SALES_END,'YYYY-MM-DD') ||',' || LOGIC||',' || LOGIC_DESCRIPTION
from Table where rownum < 100;
spool off
My External table load script
CREATE TABLE SYS_LOC_LOGIC
     CAR_MODEL_CD                         NUMBER               ,
     MAKER_CODE                              NUMBER,
     CAR_MODEL_NAME_CD                    NUMBER,
     TYPE_SPECIFY_NO                         NUMBER               ,
     CATEGORY_CLASS_NO                    NUMBER               ,
     SPECIFICATION                         VARCHAR2(300),
     DOOR_NUMBER                              NUMBER,
     RECOGNITION_TYPE                    VARCHAR2(30),
     SALES_START                          DATE ,
     SALES_END                               DATE ,
     LOGIC                                   NUMBER,
     LOGIC_DESCRIPTION                    VARCHAR2(100)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY XMLTEST1
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
                    CAR_MODEL_CD,MAKER_CODE,CAR_MODEL_NAME_CD,TYPE_SPECIFY_NO,
                    CATEGORY_CLASS_NO,SPECIFICATION,DOOR_NUMBER,RECOGNITION_TYPE,
                    SALES_START date 'yyyy-mm-dd', SALES_END      date 'yyyy-mm-dd',
                    LOGIC, LOGIC_DESCRIPTION     
LOCATION ('SYS_LOC_LOGIC.txt')
--location ('products.csv')
REJECT LIMIT UNLIMITED;
How to solve this.
Thanks in advance,
Pal

Just so I'm clear, user1 connects to the database server and runs the spool to generate a flat file from the database. User2 then uses that flat file to load that data back in to the same database? If the data isn't going anywhere, I assume there is a good reason to jump through all these unload and reload hoops rather than just moving the data from one table to another...
What is the NLS_LANG set in the client's environment when the spool is generated? Note that the NLS_CHARACTERSET is a database setting, not a client setting.
What character set is the text file? Are you certain that the text file is UTF-8 encoded? And not encoded using the operating system's local code page (assuming the operating system is capable of displaying Japanese text)
There is a CHARACTERSET parameter for the external table definition, but that should default to the character set of the database.
Justin

Similar Messages

  • Error in accessing data through external table

    Hi,
    I am getting the following error while trying to view data through external table,
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04062: no data source specified
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    according to this error "KUP-04062: no data source specified", location should be specified and i have specified the location as
    LOCATION (<diectory_name>:' '),
    then also it is giving the same error.
    Please Help!

    I am also got the same error when retrieving the data from external table.
    I resolve this problem, like this:
    1. I imported the flat file(.csv) into repository.
    2. Map that flat file fields to database table cols.
    3. Deployed the mapping using controlcenter, and run the mapping.
    4. if it fails there, i loaded the flatfile data through the command prompt using "sqlldr" statement and control file is our mapping control file.
    5 Then it loaded data into database table sucessfully.
    Thanks.

  • External Table and Direct path load

    Hi,
    I was just playing with Oracle sql loader and external table features. few things which i ovserved are that data loading through direct path method of sqlloader is much faster and takes much less hard disk space than what external table method takes. here are my stats which i found while data loading:
    For Direct Path: -
    # OF RECORDS.............TIME...................SOURCE FILE SIZE...................DATAFILE SIZE(.dbf)
    478849..........................00:00:43.53...................108,638 KB...................142,088 KB
    957697..........................00:01:08.81...................217,365 KB...................258,568 KB
    1915393..........................00:02:54.43...................434,729 KB...................509,448 KB
    For External Table: -
    # OF RECORDS..........TIME...................SOURCE FILE SIZE...................DATAFILE SIZE(.dbf)
    478849..........................00:02:51.03...................108,638 KB...................966,408 KB
    957697..........................00:08:05.32...................217,365 KB...................1,930,248 KB
    1915393..........................00:17:16.31...................434,729 KB...................3,860,488 KB
    1915393..........................00:23:17.05...................434,729 KB...................3,927,048 KB
    (With PARALLEL)
    i used same files for testing and all other conditions are similar also. In my case datafile is autoextendable, hence, as par requirement its size is automatically increased and hard disk space is reduced thus.The issue is that, is this an expected behaviour? and why in case of external tables such a large hard disk space is used when compared to direct path method? Performance of external table load is also very bad when compared to direct path load.
    one more thing is that while using external table load with PARALLEL option, ideally, it should take less time. But what i actually get is more than what the time was without PARALLEL option.
    In both the cases i am loading data from the same file to the same table (once using direct path and once using external table). before every fresh loading i truncate my internal table into which data was loaded.
    any views??
    Deep
    Message was edited by:
    Deep

    Thanx to all for your suggestions.
    John, my scripts are as follows:
    for external table:
    CREATE TABLE LOG_TBL_LOAD
    (COL1 CHAR(20),     COL2 CHAR(2),     COL3 CHAR(20),     COL4 CHAR(400),
         COL5 CHAR(20),     COL6 CHAR(400),     COL7 CHAR(20),     COL8 CHAR(20),
         COL9 CHAR(400),     COL10 CHAR(400))
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY EXT_TAB_DIR
    ACCESS PARAMETERS
    (RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY WHITESPACE OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES ARE NULL     
    LOCATION ('LOGZ3.DAT')
    REJECT LIMIT 10;
    for loading i did:
    INSERT INTO LOG_TBL (COL1, COL2, COL3, COL4,COL5, COL6,
    COL7, COL8, COL9, COL10)
    (SELECT COL1, COL2, COL3, COL4, COL5, COL6, COL7, COL8,
    COL9, COL10 FROM LOG_TBL_load_1);
    for direct path my control file is like this:
    OPTIONS (
    DIRECT = TRUE
    LOAD DATA
    INFILE 'F:\DATAFILES\LOGZ3.DAT' "str '\n'"
    INTO TABLE LOG_TBL
    APPEND
    FIELDS TERMINATED BY WHITESPACE OPTIONALLY ENCLOSED BY '"'
    (COL1 CHAR(20),
    COL2 CHAR(2),
    COL3 CHAR(20),
    COL4 CHAR(400),
    COL5 CHAR(20),
    COL6 CHAR(400),
    COL7 CHAR(20),
    COL8 CHAR(20),
    COL9 CHAR(400),
    COL10 CHAR(400))
    and ya, i have used same table in both the situations. after loading once i used to truncate my table, LOG_TBL. i used the same source file, LOGZ3.DAT.
    my tablespace USERS is loaclly managed.
    thanks

  • SQL Loader versus External Table

    If anyone has worked on external tables please let me know your views.

    user637544 wrote:
    for sqlldr i follow the following approach
    1. truncate table
    2. call sqlldr and load records in staging table
    3. check for bad records
    how do i tuncate, call external table and check bad records for external table.As part of the SQL*Loader control file you can tell it to truncate the table as part of the process before it loads in the data.
    The key differences between SQL*Loader and External Tables are:
    1. SQL*Loader is an external utility run from the o/s command line, whereas External tables are usable from within SQL and PL/SQL.
    2. SQL*Loader can only load data up into the database, whereas External tables can allow you to read files and write files (10g onwards)
    3. SQL*Loader has limited control on skipping rows etc. whereas External tables can be queried using SQL and has all the flexibility that SQL can offer.
    4. SQL*Loader requires connection information to the database, whereas External tables are already part of the database
    5. SQL*Loader can only change the source filename through dynamic o/s level scripts, whereas External tables can have the filename changed using an ALTER TABLE ... LOCATION ... command.
    If you want to truncate your staging table before loading it with data from the external table, then you will just have to do that as a seperate step, because the external table is not associated with other tables. Simply truncate the other table and then query the data from the external table into the staging table.
    External tables offer a lot more flexibility than using SQL*Loader.

  • SQL *Loader and External Table

    Hi,
    Can anyone tell me the difference between SQL* Loader and External table?
    What are the conditions under we can use SQL * Loader and External Table.
    Thanx

    External tables are accessible from SQL, which generally simplifies life if the data files are physically located on the database server since you don't have to coordinate a call to an external SQL*Loader script with other PL/SQL processing. Under the covers, external tables are normally just invoking SQL*Loader.
    SQL*Loader is more appropriate if the data files are on a different server or if it is easier to call an executable rather than calling PL/SQL (i.e. if you have a batch file that runs on a server other than the database server that wants to FTP a data file from a FTP server and then load the data into Oracle).
    Justin

  • Oracle BI Groups, Roles and permission through external Table

    Hi,
    We are using SSo integration with Oracle BI 10g. We need to fetch the roles , permission and groups through an external table to our Oracle BI Dashboard. Please let me know if this is possible.
    Thanks,
    Aditya Arya

    Thanks a lot shru.
    I have achieved this User authentication through external table but the roles, groups and permissions are assigned inside Oracle BI only. I need to get the roles from an external database table and map the users in that database only. I do not want to use the administration screen in Oracle BI to achieve this.
    Also, I need to know what is the OBIEE variable i can use to override roles, as we use USER for adding a new user and the values that can be used to map the permissions.
    Thanks,
    Aditya Arya

  • Sql loader or external table

    Hi all good morning.
    can we write a stored procedure that loads a file into the table using sql loader?
    can Java call the above stored procedure?
    regards
    raj
    Edited by: user10887630 on Apr 23, 2009 6:18 AM

    Are you saying the files themselves can't be located on the server? or just that the process for loading the files can't be located on the server.
    If the files themselves cannot reside on the server then you won't be able to use SQL*Loader or External tables from within stored procedures. It would require some clever Java code type stuff to get across to a.n.other machine where the files are stored and get the data.
    Typically it is normal for such files to be located on the server. What reasons do the DBA's give for not wanting them there?
    DBA's say that application specific files cannot be maintained on the Database serverSo what are all the database data files then? They hold data from the applications. ;)

  • Error while reading data through External Table!!!

    CREATE TABLE "COGNOS"."EXT_COGNOS_TBS9_TEST"
    (     "ITEM_DESC" VARCHAR2(200 BYTE),
    "EXT_CODE" VARCHAR2(20 BYTE),
    "RC_DATE" DATE,
    "RES_KD_AMNT" NUMBER(18,3),
    "RES_FC_AMNT" NUMBER(18,3),
    "NRES_KD_AMNT" NUMBER(18,3),
    "NRES_FC_AMNT" NUMBER(18,3),
    "TOTAL" NUMBER(18,3),
    "OF_WHICH_OVR1" NUMBER(18,3)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY "EXTDATADIR"
    ACCESS PARAMETERS
    ( RECORDS
    DELIMITED BY NEWLINE LOAD WHEN *({color:#ff0000}EXT_CODE LIKE 'TBS9%'{color})* FIELDS TERMINATED BY ','
    MISSING FIELD VALUES ARE NULL )
    LOCATION
    ( 'TBS9_TEST.CSV'
    External table creation went through successfully but am getting error while reading data. Am quite sure error is because of above line in red color. Could you please help me in transforming logic.
    Thanks in Advance,
    AP

    Let's start with the basics...
    1) You state that you are getting an error. What error do you get? Is this an Oracle error (i.e. ORA-xxxxx)? If so, please include the error number and the error message as well as the triggering statement. Or is the problem that rows are getting written to the reject file and errors are being written to the log file? If so, what record(s) are being rejected and what are the reasons given in the log file? Or perhaps the problem is something else?
    2) You state that you are quite sure that the problem relates to the hilighted code. What makes you quite sure of this?
    Justin

  • 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 when loading from External Tables in OWB 11g

    Hi,
    I face a strange problem while loading data from flat file into the External Tables.
    ORA-12899: value too large for column EXPIRED (actual: 4, maximum: 1)
    error processing column EXPIRED in row 9680 for datafile <data file location>/filename.dat
    In a total of 9771 records nearly 70 records are rejected due to the above mentioned error. The column (EXPIRED) where the error being reported doesn't have value greater than 1 at all. I suspect it to be a different problem.
    Example: One such record that got rejected is as follows:
    C|234|Littérature commentée|*N*|2354|123
    highlightened in Bold is the EXPIRED Column.
    When I tried to insert this record into the External Table using UTL_FILE Utility it got loaded successfully. But when I try with the file already existing in the file directory it again fails with the above error, and I would like to mention that all the records which have been loaded are not Ok, please have a look at the DESCRIPTION Column which is highlightened. The original information in the data file looks like:
    C|325|*Revue Générale*|N|2445|132
    In the External Table the Description Value is replaced by the inverted '?' as follows:
    Reue G¿rale
    Please help.
    Thanks,
    JL.

    user1130292 wrote:
    Hi,
    I face a strange problem while loading data from flat file into the External Tables.
    ORA-12899: value too large for column EXPIRED (actual: 4, maximum: 1)
    error processing column EXPIRED in row 9680 for datafile <data file location>/filename.dat
    In a total of 9771 records nearly 70 records are rejected due to the above mentioned error. The column (EXPIRED) where the error being reported doesn't have value greater than 1 at all. I suspect it to be a different problem.
    Example: One such record that got rejected is as follows:
    C|234|Littérature commentée|*N*|2354|123
    highlightened in Bold is the EXPIRED Column.
    When I tried to insert this record into the External Table using UTL_FILE Utility it got loaded successfully. But when I try with the file already existing in the file directory it again fails with the above error, and I would like to mention that all the records which have been loaded are not Ok, please have a look at the DESCRIPTION Column which is highlightened. The original information in the data file looks like:
    C|325|*Revue Générale*|N|2445|132
    In the External Table the Description Value is replaced by the inverted '?' as follows:
    Reue G¿rale
    Please help.
    Thanks,
    JL.sorry, couldnt see the highlighted test.could you plesae enclsoe it in  tags
    also post the table definition with attributes. BTW..Whats your NLS_LANGUAGE SET TO?

  • Data Mismatch while selecting from External Table

    Hi I am not able create an external table,I am trying to create and test table and able to create but when i selecting the data it showing data mismatch.I tried for an test data but it returned error.I want to load from an excel file saved as test.csv
    CREATE TABLE Per_ext
    CITY VARCHAR2(30),
    STATE VARCHAR2(20),
    ZIP VARCHAR2(10),
    COUNTRY VARCHAR2(30)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY dataload
    ACCESS PARAMETERS
    MISSING FIELD VALUES ARE NULL
    LOCATION ('test.csv')
    REJECT LIMIT UNLIMITED;
    test.csv file contents
    city ----------     state---------Zip------------country
    Bombay-----     MH------------34324-------india
    london-------London------1321---------UK
    Pune---------MH------------3224---------india
    Banglore----     Karnataka---11313-------india
    rgds
    soumya

    Hi Justin
    I am getting following error when i trying from toad
    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 "comma": expecting one of: "badfile, byteordermark, characterset, column, data, delimited, discardfile, exit, fields, fixed, load, logfile, language, nodiscardfile, nobadfile, nologfile, date_cache, processing, readsize, string, skip, territory, variable"
    KUP-01007: at line 1 column 29
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    rgds
    soumya

  • 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'.

  • How to transform data while populating an external table

    Hi Folks,
    I have to populate the first four fields of my external table from the data in a csv file. While the last field should have the "SYSDATE". My code to create an external table (and to populate the first four fields) is as follows
    create table T_XT
    (PNODE VARCHAR2(10),
    NODE VARCHAR2(15),
    SUB_NODE VARCHAR2(12),
    NODE_COUNT NUMBER,
    CREATE_DATE DATE
    organization external
    (type oracle_loader
    default DIRECTORY topology
    access parameters
    (records delimited by NEWLINE
    characterset US7ASCII
    badfile 'TOPOLOGY':'Modem_Count.bad'
    discardfile 'TOPOLOGY':'Modem_Count.dis'
    logfile 'TOPOLOGY':'Modem_Count.log'
    fields terminated by ','
    optionally enclosed by "'"
    location ('Modem_Count.csv')
    reject limit unlimited parallel;
    Can somebody please let me know where this data transformation (for the last field) should be specified ? And the syntax to do so.
    Thanks in advance
    rogers42

    Hi,
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6790030213850#59876418675556
    You'd rather just:
    select pnode,
           node,
           sub_node,
           node_count,
           sysdate
    from   t_xt;

  • Error:loading from external table to database table

    hi,
    Following error comes while inserting data from external to new_ext table
    what might be the reason??
    error and external table creation script is as follows
    regards,
    Avinash
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-29400: data cartridge error
    KUP-04020: found record longer than buffer size supported, 524288, in
    /home/oracle/rgtr1.txt
    ORA-06512: at " SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1
    ORA-06512: at "PRODNDBA.PROC_RGTR1", line 513
    ORA-06512: at line 1
    external table script is as follows:
    DROP
    TABLE EXT_TABLE_RGTR1 CASCADE CONSTRAINTS;
    CREATE
    TABLE EXT_TABLE_RGTR1
    ID
    VARCHAR2(10 BYTE),
    PC
    VARCHAR2(2 BYTE),
    BU
    VARCHAR2(4 BYTE),
    CONSUMER_NO
    VARCHAR2(12 BYTE),
    CUR_READING1
    NUMBER,
    CUR_READING2
    NUMBER,
    ADJ_CONS1
    NUMBER,
    ADJ_CONS2
    NUMBER,
    TOT_EC
    NUMBER,
    TOT_FCA
    NUMBER,
    TOT_ED
    NUMBER,
    ADDLESS_AMT
    NUMBER,
    NETBILL_AMT
    NUMBER,
    ADJ_UNIT1
    NUMBER,
    ADJ_UNIT2
    NUMBER,
    TARIFF_CODE
    NUMBER,
    DUTY_CODE
    NUMBER,
    DISCONN_TAG
    VARCHAR2(1 BYTE),
    MIN_CHRG_IND
    VARCHAR2(1 BYTE),
    OC_CODE1
    VARCHAR2(1 BYTE),
    OC_CODE2
    VARCHAR2(1 BYTE),
    OC_AMT1
    NUMBER,
    OC_AMT2
    NUMBER,
    PREV_DPC
    NUMBER,
    CREDIT_AVG_BILL
    NUMBER,
    ADJ_TYPES
    NUMBER,
    ADJ_EC_FCA
    NUMBER,
    ADJ_ED
    NUMBER,
    ADJ_AMT1
    NUMBER,
    ADJ_AMT2
    NUMBER,
    ADJ_AMT3
    NUMBER,
    ADJ_AMT4
    NUMBER,
    ADJ_AMT5
    NUMBER,
    ADJ_AMT6
    NUMBER,
    ADJ_AMT7
    NUMBER,
    ADJ_AMT8
    NUMBER,
    MR_CYCLE
    VARCHAR2(2 BYTE),
    NOTICE
    VARCHAR2(2 BYTE),
    INSTAL_IND
    VARCHAR2(1 BYTE),
    LAST_RCPT_DT
    VARCHAR2(6 BYTE),
    MS1
    NUMBER,
    MS2
    NUMBER,
    ARR_PL_CR
    NUMBER,
    PREV_READ1
    NUMBER,
    PREV_READ2
    NUMBER,
    OLD_CONS_NUM
    VARCHAR2(16 BYTE),
    MTR_CODE1
    VARCHAR2(2 BYTE),
    MTR_CODE2
    VARCHAR2(2 BYTE),
    ABR_EC1
    NUMBER,
    ABR_FCA1
    NUMBER,
    REV_CAT
    VARCHAR2(2 BYTE),
    BILL_DT
    DATE,
    SD_PAID
    NUMBER,
    SD_ARRS
    NUMBER,
    SD_ADDL
    NUMBER,
    PR_RDNG_IND1
    VARCHAR2(1 BYTE),
    PR_RDNG_IND2
    VARCHAR2(1 BYTE),
    NAB_IND
    VARCHAR2(1 BYTE),
    CONN_LOAD
    NUMBER,
    OLDEST_OS_DT
    VARCHAR2(4 BYTE),
    ABR_RECAMT1
    NUMBER,
    METER_RENT
    NUMBER,
    EX_DUTY
    NUMBER,
    TDL_CHARGES
    NUMBER,
    ABR_MTH
    VARCHAR2(4 BYTE),
    READING_IND
    VARCHAR2(1 BYTE),
    FB_IND
    VARCHAR2(1 BYTE),
    ADJ_AMT
    NUMBER,
    MTR_NUM1
    NUMBER,
    MTR_NUM2
    NUMBER,
    AVG_UNITS1
    NUMBER,
    AVG_UNITS2
    NUMBER,
    MIN_BILL_AMT
    NUMBER,
    METER_COST_DEMANDED
    NUMBER,
    MF1
    VARCHAR2(2 BYTE),
    MF2
    VARCHAR2(2 BYTE),
    MR
    VARCHAR2(2 BYTE),
    ROUTE
    VARCHAR2(4 BYTE),
    SEQ
    VARCHAR2(4 BYTE),
    DISC_IND
    VARCHAR2(1 BYTE),
    FREEZE_CODE
    VARCHAR2(1 BYTE),
    MTH40
    NUMBER,
    CONCES_EC
    NUMBER,
    METER_COST_ARREARS
    NUMBER,
    METER_COST_PAID
    NUMBER,
    SANCTION_LOAD
    NUMBER,
    PENALTY_ON_CL
    NUMBER,
    CL_SLB
    NUMBER,
    UNTSLB
    NUMBER,
    CAPACIT_PENALTY
    NUMBER,
    ARREARS_OF_INT
    NUMBER,
    INT_ON_ARREARS
    NUMBER,
    FIXED_CHARGES
    NUMBER,
    ASSESSED_DPC
    NUMBER,
    FCA_UNT_OLD
    NUMBER,
    FCA_UNT_NEW
    NUMBER,
    DEFECT_RDN1
    NUMBER,
    DEFECT_RDN2
    NUMBER,
    CAP_CT_RENT
    NUMBER,
    CT_RENT
    NUMBER,
    ADV_BILL_IND
    VARCHAR2(1 BYTE),
    ADV_BILL_RD_IND
    VARCHAR2(1 BYTE),
    INST_IND
    VARCHAR2(1 BYTE),
    CONSCUR_STATUS
    VARCHAR2(1 BYTE),
    MTR_COST1
    NUMBER,
    MTR_COST2
    NUMBER,
    MTR_COST3
    NUMBER,
    LOOM_NOS
    NUMBER,
    CONS_OLD_TARIFF
    NUMBER,
    CONS_NEW_TARIFF
    NUMBER,
    PD_TD_DATE
    VARCHAR2(6 BYTE),
    ED5
    VARCHAR2(10 BYTE),
    ED6
    VARCHAR2(10 BYTE),
    ED8
    VARCHAR2(10 BYTE),
    B66_AMT1
    NUMBER,
    BILL_MTH
    VARCHAR2(6 BYTE),
    STD_MTH
    NUMBER,
    PREV_RD_MTH
    VARCHAR2(4 BYTE),
    ACCT_HD_TRF
    VARCHAR2(2 BYTE),
    ADM_CODE
    NUMBER,
    BILL_DUE_DATE
    DATE,
    EC_DUTY
    NUMBER,
    ABNOR_IND
    VARCHAR2(1 BYTE),
    TRF04_CONN_LOAD
    NUMBER,
    PROCESS_DT
    DATE,
    SUPPLY_DATE
    VARCHAR2(6 BYTE),
    BILL_DT_FROM
    DATE,
    RECEIPT_AMT
    NUMBER,
    LOCKED_CR_UNITS
    NUMBER,
    LOCKED_CHARGES
    NUMBER,
    LOCKED_ED
    NUMBER,
    LOCKED_FCA
    NUMBER,
    LOCKED_FC
    NUMBER,
    LOCKED_RLCHARGES
    NUMBER,
    LOCKED_CL
    NUMBER,
    LOCKED_ECEDFIX
    NUMBER,
    LOCKED_ACC_MONTH
    NUMBER,
    AVG_OLD_CONSMP
    NUMBER(6),
    AVG_SINCE
    VARCHAR2(4 BYTE),
    AVG_OCCURANCES
    NUMBER(2),
    AVG_MA_IND
    VARCHAR2(1 BYTE),
    MTR1_PHASE
    NUMBER(1),
    MTR_PHASE1
    VARCHAR2(1 BYTE),
    MTR2_PHASE
    NUMBER(1),
    IND_CAT
    VARCHAR2(1 BYTE),
    L61_TARIFF
    NUMBER(2),
    MTR_CHG_AMT1
    NUMBER(12),
    NO_OF_MONTHS
    NUMBER,
    MTR_CHG_AMT2
    NUMBER(12),
    B66_AMT
    NUMBER(10),
    ADJ_AMT11
    NUMBER,
    B66_ADJ_TYP
    VARCHAR2(1 BYTE),
    B60_AMT
    NUMBER(10),
    ADJ_AMT13
    NUMBER,
    B60_ADJ_TYP
    VARCHAR2(1 BYTE),
    CPF_NO
    NUMBER(8),
    ADJ1
    NUMBER(9),
    ADJ2
    NUMBER(9),
    ADJ3
    NUMBER(9),
    ADJ4
    NUMBER(9),
    ADJ5
    NUMBER(9),
    ADJ6
    NUMBER(9),
    ADJ7
    NUMBER(9),
    ADJ8
    NUMBER(9),
    ADJ11
    NUMBER(9),
    ADJ13
    NUMBER(9),
    DTC_CODE
    VARCHAR2(7 BYTE),
    TITLE
    VARCHAR2(8 BYTE),
    NAME
    VARCHAR2(36 BYTE),
    ADDRESS1
    VARCHAR2(26 BYTE),
    ADDRESS2
    VARCHAR2(26 BYTE),
    VILLAGE
    VARCHAR2(14 BYTE),
    PIN
    VARCHAR2(6 BYTE),
    LOCK_SINCE
    VARCHAR2(4 BYTE),
    FAULTY_SINCE
    VARCHAR2(4 BYTE),
    MTR_DIGIT1
    VARCHAR2(1 BYTE),
    MTR_DIGIT2
    VARCHAR2(1 BYTE),
    FCA_PAISE
    NUMBER(9),
    GTY_EXP_DT
    VARCHAR2(6 BYTE),
    REJ_READ_MTR1
    NUMBER(6),
    REJ_READ_MTR2
    NUMBER(6),
    REJ_ADJ_UNITS1
    NUMBER(6),
    REJ_CONSMP
    NUMBER(6),
    OWNER_CODE
    NUMBER(1),
    MTR_CAP_AMP
    NUMBER(1),
    MTR_A
    VARCHAR2(1 BYTE),
    MTR_C
    VARCHAR2(1 BYTE),
    MTR_D
    VARCHAR2(1 BYTE),
    MTR_E
    VARCHAR2(1 BYTE),
    CUT_OF_DT
    DATE,
    POLE
    VARCHAR2(6 BYTE),
    EDRATE
    NUMBER(9),
    AREA
    VARCHAR2(1 BYTE),
    MTR_BRAND1
    VARCHAR2(2 BYTE),
    MTR_BRAND2
    VARCHAR2(2 BYTE),
    LC1
    NUMBER(3),
    POWER_CUT_IND
    VARCHAR2(1 BYTE),
    SERVICE_DT
    DATE,
    ADJ_UNIT11
    NUMBER,
    ADJ_UNIT22
    NUMBER,
    RECEIPT_AMT1
    NUMBER,
    MTR1
    NUMBER,
    STRK_BLL_AMT
    NUMBER,
    DUTY_UNTS1
    NUMBER,
    DUTY_AMT1
    NUMBER,
    DUTY_UNTS2
    NUMBER,
    DUTY_AMT2
    NUMBER,
    DUTY_UNTS3
    NUMBER,
    DUTY_AMT3
    NUMBER,
    ADJ_UNIT_45
    NUMBER,
    ADV_BIL_EC
    NUMBER,
    NEW_DUTY_RATE
    NUMBER,
    NEW_DUTY_UNTS
    NUMBER,
    NEW_DUTY_AMT
    NUMBER,
    DPC_PAB
    NUMBER,
    MS9_SINCE
    VARCHAR2(4 BYTE),
    DISTRICT_CODE
    NUMBER(2),
    TAX_ON_SALE
    NUMBER,
    LOCKED_CHARGES_TSE
    NUMBER
    ORGANIZATION
    EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY EXT_DIR
    ACCESS PARAMETERS
    ( records delimited by newline
    badfile
    'ext.bad'
    logfile 'ext.log'
    fields
    ID POSITION
    (1-4),
    PC POSITION
    (7-7),
    BU POSITION
    (8-11),
    CONSUMER_NO POSITION
    (18-29 ),
    CUR_READING1 POSITION
    (33-41 ),
    CUR_READING2 POSITION
    (42-50 ),
    ADJ_CONS1 POSITION
    (51-59 ),
    ADJ_CONS2 POSITION
    (60-68 ),
    TOT_EC POSITION
    (69-86),
    TOT_FCA POSITION
    (87-104 ),
    TOT_ED POSITION
    (105-122 ),
    ADDLESS_AMT POSITION
    (123-140 ),
    NETBILL_AMT POSITION
    (141-158 ),
    ADJ_UNIT1 POSITION
    (159-167 ),
    ADJ_UNIT2 POSITION
    (168-176 ),
    TARIFF_CODE POSITION
    (177-178 ),
    DUTY_CODE POSITION
    (179-180 ),
    DISCONN_TAG POSITION
    (181-181 ),
    MIN_CHRG_IND POSITION
    (182-182 ),
    OC_CODE1 POSITION
    (183-183 ),
    OC_CODE2 POSITION
    (184-184 ),
    OC_AMT1 POSITION
    (185-202 ),
    OC_AMT2 POSITION
    (203-220 ),
    PREV_DPC POSITION
    (221-238 ),
    CREDIT_AVG_BILL POSITION
    (239-256 ),
    ADJ_TYPES POSITION
    (257-264 ),
    ADJ_EC_FCA POSITION
    (265-282 ),
    ADJ_ED POSITION
    (283-300 ),
    ADJ_AMT1 POSITION
    (301-318 ),
    ADJ_AMT2 POSITION
    (319-336 ),
    ADJ_AMT3 POSITION
    (337-354 ),
    ADJ_AMT4 POSITION
    (355-372 ),
    ADJ_AMT5 POSITION
    (373-390 ),
    ADJ_AMT6 POSITION
    (391-408 ),
    ADJ_AMT7 POSITION
    (409-426 ),
    ADJ_AMT8 POSITION
    (427-444 ),
    MR_CYCLE POSITION
    (445-446 ),
    NOTICE POSITION
    (447-448 ),
    INSTAL_IND POSITION
    (449-449 ),
    LAST_RCPT_DT POSITION
    (453-458 ),
    MS1 POSITION
    (459-459),
    MS2 POSITION
    (460-460),
    ARR_PL_CR POSITION
    (461-478 ),
    PREV_READ1 POSITION
    (479-487 ),
    PREV_READ2 POSITION
    (488-496 ),
    OLD_CONS_NUM POSITION
    (497-512 ),
    MTR_CODE1 POSITION
    (513-514 ),
    MTR_CODE2 POSITION
    (515-516 ),
    ABR_EC1 POSITION
    (517-534 ),
    ABR_FCA1 POSITION
    (535-552 ),
    REV_CAT POSITION
    (553-554 ),
    BILL_DT POSITION
    (555-560 ) DATE "DDMMYY",
    SD_PAID POSITION
    (561-569 ),
    SD_ARRS POSITION
    (570-578 ),
    SD_ADDL POSITION
    (579-587 ),
    PR_RDNG_IND1 POSITION
    (588-588 ),
    PR_RDNG_IND2 POSITION
    (589-589 ),
    NAB_IND POSITION
    (590-590 ),
    CONN_LOAD POSITION
    (592-600 ),
    OLDEST_OS_DT POSITION
    (601-604 ),
    ABR_RECAMT1 POSITION
    (605-622 ),
    METER_RENT POSITION
    (623-631 ),
    EX_DUTY POSITION
    (632-649 ),
    TDL_CHARGES POSITION
    (632-649 ),
    ABR_MTH POSITION
    (650-651 ),
    READING_IND POSITION
    (652-652 ),
    FB_IND POSITION
    (653-653 ),
    ADJ_AMT POSITION
    (654-671 ),
    MTR_NUM1 POSITION
    (672-681 ),
    MTR_NUM2 POSITION
    (682-691 ),
    AVG_UNITS1 POSITION
    (692-700 ),
    AVG_UNITS2 POSITION
    (701-709 ),
    MIN_BILL_AMT POSITION
    (710-727 ),
    METER_COST_DEMANDED POSITION
    (710-727 ),
    MF1 POSITION
    (728-729),
    MF2 POSITION
    (730-731),
    MR POSITION
    (732-733),
    ROUTE POSITION
    (734-737),
    SEQ POSITION
    (738-741),
    DISC_IND POSITION
    (742-742 ),
    FREEZE_CODE POSITION
    (743-743 ),
    MTH40 POSITION
    (744-752),
    CONCES_EC POSITION
    (753-770 ),
    METER_COST_ARREARS POSITION
    (753-770 ),
    METER_COST_PAID POSITION
    (771-788 ),
    SANCTION_LOAD POSITION
    (789-797 ),
    PENALTY_ON_CL POSITION
    (798-815 ),
    CL_SLB POSITION
    (816-817 ),
    UNTSLB POSITION
    (818-819 ),
    CAPACIT_PENALTY POSITION
    (820-837 ),
    ARREARS_OF_INT POSITION
    (838-855 ),
    INT_ON_ARREARS POSITION
    (856-873 ),
    FIXED_CHARGES POSITION
    (874-891 ),
    ASSESSED_DPC POSITION
    (892-909 ),
    FCA_UNT_OLD POSITION
    (910-927 ),
    FCA_UNT_NEW POSITION
    (928-945 ),
    DEFECT_RDN1 POSITION
    (982-990 ),
    DEFECT_RDN2 POSITION
    (991-999 ),
    CAP_CT_RENT POSITION
    (1000-1008 ),
    CT_RENT POSITION
    (1009-1017 ),
    ADV_BILL_IND POSITION
    (1018-1018 )
    LOCATION
    (EXT_DIR:'rgtr1.txt')
    REJECT
    LIMIT UNLIMITED
    LOGGING
    NOCACHE
    NOPARALLEL;

    KUP-04020: found record longer than buffer size supported, number, in string
    Cause: a record in the data source was longer than the maximum data size supported. The number reported is the maximum supported size of a record.
    Action: none
    Examine your bad file and log files for details of the rows which failed from insertion.

  • Selective load in external table

    Hi all,
    I need to load data into my external table based on conditions. If i use the 'load when' im able to load the data into the table but my requirement is to load data into different columns of the same table based on the conditional "when" clause.
    This is equivalent to wht we do in .ctl file using loader..Th scenario being:
    LOAD DATA     
    INFILE '/m018/applmgr/ERP1/modap/1.0.0/bin/BNKSTMT260508.txt'                                   
    APPEND
    INTO TABLE                                   
    MODAP_IN_BNK_RECON_TBL     
    WHEN record_type = '01'
    FIELDS TERMINATED BY ','                              
    OPTIONALLY ENCLOSED BY '"'                              
    TRAILING NULLCOLS                                   
    (RECORD_TYPE POSITION(1)
    ,SENDER_IDENTI
    ,RECEIVER_IDENTI
         ,FILE_CREATION_DATE DATE "YYMMDD" NULLIF FILE_CREATION_DATE=BLANKS
         ,FILE_CREATION_TIME
         ,FILE_SEQ_NO
         ,RECORD_LENGTH
         ,BLOCKING_FACTOR
         ,VERSION_NO
    INTO TABLE                                   
    MODAP_IN_BNK_RECON_TBL     
    WHEN record_type = '02'
    FIELDS TERMINATED BY ','                              
    OPTIONALLY ENCLOSED BY '"'                              
    TRAILING NULLCOLS                                   
    (RECORD_TYPE POSITION(1) "TRIM(:RECORD_TYPE)"
    ,RECEIVER_IDENTI "TRIM(:RECEIVER_IDENTI)"
    ,ORIGINATOR_IDENTI "TRIM(:ORIGINATOR_IDENTI)"
         ,GROUP_STATUS "TRIM(:GROUP_STATUS)"
         ,AS_OF_DATE DATE "YYMMDD" NULLIF AS_OF_DATE=BLANKS
         ,AS_OF_TIME "TRIM(:AS_OF_TIME)"
         ,CURRENCY_CODE "TRIM(:CURRENCY_CODE)"
    I want to replicate the same in external table. Please suggest me a suitable solution for this at the earliest.
    Regards,
    Balaji V

    Here is a sample I used:
    DROP TABLE myschema.mytable;
    CREATE TABLE myschema.mytable (
    "ID" VARCHAR2(12),
    "RESP_DOB" DATE,
    "RESP_FAM_REL" VARCHAR2(5),
    "PET_FIRST_NAME" VARCHAR2(11),
    "PET_MIDDLE_NAME" VARCHAR2(11),
    "PET_LAST_NAME" VARCHAR2(17),
    "PET_SUFFIX" VARCHAR2(1)
    ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY "MY_DIRECTORY"
    ACCESS PARAMETERS(
    RECORDS DELIMITED BY NEWLINE
    BADFILE 'the_BAD.TXT'
    DISCARDFILE 'the_DISCARD.TXT'
    LOGFILE 'the_LOG.TXT'
    FIELDS
    MISSING FIELD VALUES ARE NULL
    ID POSITION(1:12),
    RESP_DOB POSITION(98:105) DATE MASK "mmddyyyy",
    RESP_FAM_REL POSITION(106:110) NULLIF RESP_FAM_REL=".",
    PET_FIRST_NAME POSITION(111:121) NULLIF PET_FIRST_NAME=".",
    PET_MIDDLE_NAME POSITION(122:132) NULLIF PET_MIDDLE_NAME=".",
    PET_LAST_NAME POSITION(133:149) NULLIF PET_LAST_NAME=".",
    PET_SUFFIX POSITION(150:150) NULLIF PET_SUFFIX="."
    LOCATION ('the_file.txt')
    );

Maybe you are looking for

  • SRM 7.0# Plant in purchase order

    Hi Experts, The issue is to keep PLANT text in purchase order along with location feild in header.I created through webdynpro but it is not mapping to corresponding PLANT and not displaying in the screen.The details are mentioned below Webdynpro Comp

  • Photo Edit in CS4 not working

    Hello, THE SETUP I have LR 3.3 and PS CS 4 Version 11.0.2 on a Mac running OS X.6.7. My "About Lightroom" screen reports the presence of Camera Raw 6.3. In my LR preferences under "External Editing" tab, I have the option to "Edit in Adobe Photoshop

  • Burned DVDs Won't Mount

    Recently after burning DVDs - via DiskUtility and iDVD - burned DVDs will not mount: Instead after inserting and waiting the DVD simply is spit back out. Yes, I've run Disk Warrior; did fsck -y; Onyx. What can I do now?

  • ITunes headache - won't open

    Forgot my passcode on my iPad mini (don't ask, it's been a long month) so I go to connect to iTunes since that's the only way to get anything done, and what do ya know, just like EVERYONE else is saying, it won't open! I tried restarting my laptop, d

  • Mac pro 2006 hd 2600 xt should work in bottom slot?

    I was using a 3rd party hd 4870 in the bottom and was working fine. Now I was thinking of selling the machine but when I put the older hd 2600 in the slot there is nothing. All of the other slots work fine, I have yet to see if the 4870 will work if