External table no data

I created an external table with no errors, but when I try to issue sql on that external table there is no data. Here's a sub-set of my data and the sql used to create the external table. 10.2.0.2 on aix 5.2 64bit.
"BoxC_SL.lwl"|106|"tzdpship52"|1|1|1/28/2008 0:00:00|12/30/1899 9:56:03|||||
"Genshp_SL.lwl"|106|"tzdpship52"|1|1|1/28/2008 0:00:00|12/30/1899 9:56:04|||||
"TRLAB-001B_600.lwl"|126|"\\Ibm1\tzsgprod63"|2|1|1/28/2008 0:00:00|12/30/1899 9:56:08|"14928758"|"89-5425.04"|||
"PalC_SL.lwl"|106|"tzdpship52"|1|1|1/28/2008 0:00:00|12/30/1899 9:56:11|||||
"SSCC_SL.lwl"|106|"tzdpship52"|1|1|1/28/2008 0:00:00|12/30/1899 9:56:12|||||
CREATE TABLE "DMR"."LABELS"
( "LABEL_NAME" VARCHAR2(100),
"PRINTER_NUM" NUMBER,
"PRINTER_NAME" VARCHAR2(100),
"QTY" NUMBER,
"DUPLICATES" NUMBER,
"PRINT_DATE" DATE,
"PRINT_TIME" TIMESTAMP,
"LOT" NUMBER,
"PART" VARCHAR(25),
"BATCH" VARCHAR(25),
"WONUM" NUMBER,
"ITEM" VARCHAR(25)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY "LISTENER_LOG_DIR"
ACCESS PARAMETERS
( records delimited by newline
nobadfile
nologfile
nodiscardfile
fields terminated by "|" lrtrim
missing field values are null
label_name,
printer_num,
printer_name,
qty,
duplicates,
print_date char(8) date_format
date mask "MM/DD/YY",
print_time char(8) date_format
date mask "HH24:MI:SS",
lot,
part,
batch,
wonum,
item
LOCATION
( 'AUDIT_001.txt'
REJECT LIMIT UNLIMITED;
Table created.
sys@DMRDEV> select * from dmr.labels where rownum < 10;
no rows selected
sys@DMRDEV> select count(*) from dmr.labels;
COUNT(*)
0

Hi,
Here we go
SQL&gt; drop table t11;
Table dropped.
SQL&gt;
SQL&gt; create table t11 (
2 "LABEL_NAME" VARCHAR2(20),
3 "PRINTER_NUM" NUMBER,
4 "PRINTER_NAME" VARCHAR2(20),
5 "QTY" NUMBER,
6 "DUPLICATES" NUMBER,
7 "PRINT_DATE" date,
8 "PRINT_TIME" TIMESTAMP,
9 "LOT" NUMBER,
10 "PART" VARCHAR(25),
11 "BATCH" VARCHAR(25),
12 "WONUM" NUMBER,
13 "ITEM" VARCHAR(25)
14 )
15 organization external (
16 type oracle_loader
17 default directory LISTENER_LOG_DIR
18 access parameters (
19 records delimited by 0x'0a'
20 fields terminated by "|" optionally enclosed by '"'
21 missing field values are null
22 (
23 "LABEL_NAME" ,
24 "PRINTER_NUM" ,
25 "PRINTER_NAME" ,
26 "QTY" ,
27 "DUPLICATES" ,
28 "PRINT_DATE" DATE "MM/DD/YYYY",
29 "PRINT_TIME" char(25) DATE_FORMAT timestamp mask "MM/DD/YYYY HH24:MI:SS",
30 "LOT" ,
31 "PART" ,
32 "BATCH" ,
33 "WONUM" ,
34 "ITEM"
35 )
36 )
37 location ('holidays.txt')
38 )
39 reject limit unlimited;
Table created.
SQL&gt;
I am displaying the count only since you can query select * from t11 and check.. :-)
SQL&gt; select count(*) from t11;
COUNT(*)
5
Modify the data like this :- remove *""*
BoxC_SL.lwl|106|tzdpship52|1|1|01/5/2008|12/30/1899 9:56:03|||||
Genshp_SL.lwl|106|tzdpship52|1|1|01/28/2008|12/30/1899 9:56:04|||||
PalC_SL.lwl|106|tzdpship52|1|1|1/28/2008|12/30/1899 9:56:11|||||
SSCC_SL.lwl|106|tzdpship52|1|1|1/28/2008|12/30/1899 9:56:12|||||
TRLAB-001B_600.lwl|126|\\Ibm1\tzsgprod63|2|1|1/28/2008|12/30/1899 9:56:08|14928758|89-5425.04|||
Satisfied... Answered question correctly.. ;-)
- Pavan Kumar

Similar Messages

  • External table with Date Format

    I have external table and in the file date format is YYYY-MM-DD.
    i want to insert date format mask in the create table command .
    the bleow command is getting created . But it is giving error when i use select command.
    CREATE TABLE XADV.XADV_test_EXT_TABLE
    BPO_START_DATE Date
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY XCRM_DASHBOARD
    ACCESS PARAMETERS
    ( RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY '|^|'
    BPO_START_DATE date 'YYYY-MM-DD'
    LOCATION (XCRM_DASHBOARD:'test.txt')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;
    the error i am getting is in select * from XADV_test_EXT_TABLE
    RA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "minussign": expecting one of: "column, enclosed, exit, (, ltrim, lrtrim, ldrtrim, missing, notrim, optionally, rtrim, reject"
    KUP-01007: at line 3 column 3
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    regards
    Mani

    shoblock wrote:
    use double quotes instead of single quotesHas nothing to do with the quotes. Issue is field list must be enclosed in parents:
    SQL> CREATE TABLE XADV_test_EXT_TABLE
      2  (
      3  BPO_START_DATE Date
      4  )
      5  ORGANIZATION EXTERNAL
      6  (
      7   TYPE ORACLE_LOADER
      8   DEFAULT DIRECTORY TMP
      9   ACCESS PARAMETERS
    10   (
    11    RECORDS DELIMITED BY NEWLINE
    12    FIELDS TERMINATED BY ','
    13     BPO_START_DATE date "YYYY-MM-DD"
    14   )
    15  LOCATION (TMP:'test.txt')
    16  )
    17  REJECT LIMIT UNLIMITED
    18  NOPARALLEL
    19  NOMONITORING
    20  /
    Table created.
    SQL> select * from XADV_test_EXT_TABLE
      2  /
    select * from XADV_test_EXT_TABLE
    ERROR at line 1:
    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: "column,
    enclosed, exit, (, ltrim, lrtrim, ldrtrim, missing, notrim, optionally, rtrim,
    reject"
    KUP-01008: the bad identifier was: BPO_START_DATE
    KUP-01007: at line 3 column 4
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    SQL> drop table XADV_test_EXT_TABLE;
    Table dropped.
    SQL> CREATE TABLE XADV_test_EXT_TABLE
      2  (
      3  BPO_START_DATE Date
      4  )
      5  ORGANIZATION EXTERNAL
      6  (
      7   TYPE ORACLE_LOADER
      8   DEFAULT DIRECTORY TMP
      9   ACCESS PARAMETERS
    10   (
    11    RECORDS DELIMITED BY NEWLINE
    12    FIELDS TERMINATED BY ','
    13    (
    14     BPO_START_DATE date 'YYYY-MM-DD'
    15    )
    16   )
    17  LOCATION (TMP:'test.txt')
    18  )
    19  REJECT LIMIT UNLIMITED
    20  NOPARALLEL
    21  NOMONITORING
    22  /
    Table created.
    SQL> select * from XADV_test_EXT_TABLE
      2  /
    BPO_START
    19-NOV-08
    SQL> SY.

  • How can an external table handle data with line feed between delimiters?

    I have defined an external table as below. My data is pipe delimited and comes from a DOS system.
    I already remove any carriage returns before putting the file into the DATA_DIR for reading. But
    I have found that some of my VARCHAR fields have embeded line feeds.
    Is it possible to have a definition that would remove any line feed characters between the delimiters?
    Below I also threw together a sample data set there ID #2 has that extra character. Yes, I could
    write an awk script to pre-process all my data files. But I am hoping there is a way for Oracle
    to also do this.
    I understand the LDTRIM to remove any leading and trailing spaces in the delimited field. Is there a
    REPLACE or TRANSLATE option. I did a bit of searching but I must be asking the wrong things.
    Thanks for any help
    Eric
    CREATE TABLE table_ext
      id        NUMBER,
      desc1     VARCHAR2(64 CHAR),
      desc2     VARCHAR2(255 CHAR),
      add_date  DATE
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY data_dir
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        CHARACTERSET WE8ISO8859P1
        BADFILE     log_dir:'table_ext.bad'
        DISCARDFILE log_dir:'table_ext.dis'
        LOGFILE     log_dir:'table_ext.log'
        FIELDS TERMINATED BY '|' LDRTRIM
        MISSING FIELD VALUES ARE NULL
        id        INTEGER EXTERNAL(38),
        desc1     CHAR(64),
        desc2     CHAR(255),
        add_date  CHAR DATE_FORMAT DATE MASK "yyyy-mm-dd hh24:mi",
      LOCATION( 'data.txt' )
    PARALLEL
    REJECT LIMIT UNLIMITED;
    1|short desc|long desc|2001-01-01 00:00
    2|short desc| long
    desc |1999-03-03 23:23
    3|short desc|  long  desc  | 2011-02-02 02:02

    Thanks for looking. But that relates to the record delimiter which in my case is the pipe character '|'. In my various data sets this is consistent. I expect each record to be one per line. But between two delimiters some data has a line feed. So I'm looking for a method that will "cleanup" the field data as it gets imported.
    I was hoping there was an option that would ignore any embedded line feeds (\n) characters. I.e., those not at the end of the line.
    Eric

  • Zuggest using external table as data source

    I'm a newbie at this and would love it if someone could point
    me in the right direction. I would like to use an external html
    table (instead of xml) as the datasource for Zuggest. I need to
    have the results display html content with links that open into the
    same area as the search results are displayed for continuity.
    Simply replacing
    "new Spry.Data.XMLDataSet("includes/products.xml",
    "/products/product", { sortOnLoad: "name" })"
    with
    "new Spry.Data.HTMLDataSet("includes/products.html",
    "/products/product", { sortOnLoad: "name" })"
    does not work...

    "products/product" needs to be replaced with the ID of the
    table data source.
    http://labs.adobe.com/technologies/spry/samples/htmldataset/ExternalTableAsSourceSample.ht ml

  • External table and data load order

    I'm unsing Oracle 10g exterbal table feature to load a text file to the database
    1- What is the default order of loading the text file into the Oracle table
    2- How to ensure or to change the this default behavior

    1- What is the default order of loading the text file into the Oracle tableTop (row#1) to bottom
    2- How to ensure or to change the this default behavioruse ORDER BY clause

  • Selecting data from external table

    Hi there
    I was wondering if somebody could assist me. When I try to select data from an external table, no data is displayed, and in my log file I receive the following error:
    KUP-04026: field too long for datatype. Please find attached my external table script.
    CREATE TABLE DEMO_FILE_EXT
    MACODE               NUMBER(7),
    MANO                    NUMBER(7),
    DEPNO                    VARCHAR2(2 BYTE),
    DEPTYPE                    NUMBER(5),
    STARTDATE               NUMBER(8),
    ENDDATE               NUMBER(8),
    OPTIONSTART               NUMBER(8),
    BENEFITSTART     NUMBER(8),
    STARTSUSPEND          NUMBER(8),
    ENDSUSPEND          NUMBER(8),
    INITIALS          VARCHAR2(5 BYTE),
    FIRSTNAME          VARCHAR2(20 BYTE),
    SURNAME                    VARCHAR2(25 BYTE),
    STR1                    VARCHAR2(30 BYTE),
    STR2                    VARCHAR2(30 BYTE),
    STR3                    VARCHAR2(30 BYTE),
    STR4                         VARCHAR2(30 BYTE),
    SCODE                    VARCHAR2(6 BYTE),
    POS1                    VARCHAR2(30 BYTE),
    POS2                    VARCHAR2(30 BYTE),
    POS3                    VARCHAR2(30 BYTE),
    POS4                    VARCHAR2(30 BYTE),
    PCODE                    VARCHAR2(6 BYTE),
    TELH                    VARCHAR2(10 BYTE),
    TELW                    VARCHAR2(10 BYTE),
    TELC                    VARCHAR2(10 BYTE),
    IDNUMBER          VARCHAR2(13 BYTE),
    DOB                NUMBER(8),
    GENDER               VARCHAR2(1 BYTE),
    EMPLOYER_CODE               VARCHAR2(10 BYTE),
    EMPLOYER_NAME               VARCHAR2(900 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY DEMO_FILES
    ACCESS PARAMETERS
    ( RECORDS DELIMITED BY newline
         BADFILE 'Tinusb.txt'
         DISCARDFILE 'Tinusd.txt'
         LOGFILE 'Tinusl.txt'
    SKIP 1
    FIELDS TERMINATED BY '|'
              MISSING FIELD VALUES ARE NULL
         (MACODE,
         MANO,
         DEPNO,
         DEPTYPE,
         STARTDATE,
         ENDDATE,
         OPTIONSTART,
         BENEFITSTART,
         STARTSUSPEND,
         ENDSUSPEND,
         INITIALS,
         FIRSTNAME,
         SURNAME,
         STR1,
         STR2,
         STR3,
         STR4,
         SCODE,
         POS1,
         POS2,
         POS3,
         POS4,
         PCODE,
         TELH,
         TELW,
         TELC,
         IDNUMBER,
         DOB,
         GENDER,
         EMPLOYER_CODE,
         EMPLOYER_NAME
    LOCATION (DEMO_FILES:'Test1.txt')
    REJECT LIMIT UNLIMITED
    LOGGING
    NOCACHE
    NOPARALLEL;
    I have the correct privileges on the directory, but the error seems to be on the EMPLOYER_NAME field. The file I try to upload is in pipe-delimited format. The last field in the file does not have a pipe-delimiter at the end. Can this be the problem? Must I go and look for any trailing spaces? Can I specify in the external table script how many characters I need for the employer_name field? We receive this file from an external company
    Thank you very much for the help
    Ferdie

    common mistake, you gave the field sizes in the
    column listing of the table, but not in the file
    definition. oracle does not apply one to the other.
    in the file defintion section, give explict field
    sizes.Hi shoblock
    Sorry for only coming back to you now, thank you for your help, I had to give the explicit field size for the last column (employer name).
    Thank you once again!!
    Ferdie

  • Reg. external tables

    Hi,
    While gathering stats for external tables got an error using gather_stats (automatic stats gathering job).
    I have the below queries. can some one pls throw light on these.
    1.) why stats needs to gather on external tables? external tables have data outside the database and does not have any rows/indexes.
    so what is the need of gathering stats?
    2.) how to gather stats for an external table?
    3.) will there any impact if we dont gather stats for an external table?
    Database version : 11.2.0.3

    1005428 wrote:
    Hi,
    While gathering stats for external tables got an error using gather_stats (automatic stats gathering job).I've been using Oracle for quite some time and never received "an error" ... I've seen lots of error messages that begin with ORA though, do you have any specific ones?
    1005428 wrote:
    I have the below queries. can some one pls throw light on these.
    1.) why stats needs to gather on external tables? external tables have data outside the database and does not have any rows/indexes.You don't necessarily need to. However, if you are using the external table in some SQL queries with other tables in the database you would probably want the CBO to know some basic information about how many rows, etc... since that information is what drives the CBO's decisions on which query plan to come up with, better information = better query plan = less resource utilization.
    1005428 wrote:
    so what is the need of gathering stats?
    2.) how to gather stats for an external table?Consult the documentation
    http://docs.oracle.com/cd/E11882_01/server.112/e16638/stats.htm#PFGRF003
    The database can collect statistics for external tables in the following ways:
    GATHER_TABLE_STATS procedure
    GATHER_SCHEMA_STATS procedure
    GATHER_DATABASE_STATS procedure
    Automatic optimizer statistics collection processing
    If you are using GATHER_TABLE_STATS, then explicitly set the ESTIMATE_PERCENT option to NULL, 100, or AUTO_SAMPLE because sampling on external tables is not supported. Because the database does not permit data manipulation against external tables, the database never marks statistics on external tables as stale. If new statistics are required for an external table, for example, because the underlying data files change, then drop the existing statistics and regather them.
    If the monitoring feature is disabled by setting STATISTICS_LEVEL to BASIC, then automatic optimizer statistics collection cannot detect stale statistics. In this case, you must manually gather statistics. See "Determining Stale Statistics" to learn about the automatic monitoring facility.
    1005428 wrote:
    3.) will there any impact if we dont gather stats for an external table?Yes, no, maybe.
    It depends on what you are doing and how you are doing it.
    1005428 wrote:
    Database version : 11.2.0.3Cheers,

  • Slight oversight in the Concepts guide regarding external tables

    Taking a look at the section in the Concepts guide on external tables
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/schema.htm#sthref777
    The line "External tables are read only; therefore, no DML operations are possible" is not strictly correct in 10.2, since you can insert into ORACLE_DATAPUMP external tables as the document goes on to discuss: "Oracle also provides the ORACLE_DATAPUMP type, which lets you unload data (that is, read data from a table in the database and insert it into an external table) and then reload it into an Oracle database." I assume the read only restriction is mentioned here because it was true in 9i and did not get corrected when Oracle introduced the ORACLE_DATAPUMP option in 10g.
    Justin

    Hello again. Development replies that the documentation is technically correct. We do not allow DML operations (insert, update, delete, merge) on external tables. For ORACLE_DATAPUMP, we do allow a "CREATE EXTERNAL TABLE ... AS SELECT ..." operation, but, this is DDL, not DML. This operation just populates the external table with data initially. No DML operations are allowed to modify the data, and indexes cannot be created on an external table.
    If you agree that this is the case, then I'll get the documentation clarified along these lines. If you have experience (test cases) that contradict this, please let me know, and I'll follow up further.
    Regards,
    Diana

  • 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

  • How to spilt files when using DATA UNLOAD (External Table, 10g)?

    Hi,
    I am runnin 10gR2 and need to export partitions by using data_pump driver
    via dmp files (External Tables).
    Now as requierment the created files can not exceed 2GB mark.
    Some of partitions are larger than that.
    How could I split the partition so I could be able to create files smaller than 2GB? Is there any parameter I am not aware of or do I need to do SELECT COUNT(*) FROM source_table PARTITION(partiton_01);
    and than to work with ROWNUM?
    This example working fine for all partitions samller than 2GB:
    CREATE TABLE partiton_01_tbl
    2 ORGANIZATION EXTERNAL
    3 (
    4 TYPE ORACLE_DATAPUMP
    5 DEFAULT DIRECTORY def_dir1
    6 LOCATION ('inv_xt1.dmp')
    7 )
    8 PARALLEL 3
    9 AS SELECT * FROM source_table PARTITION(partiton_01);

    You could specify multiple destination files in the LOCATION parameter (the number of files should match the degree of parallelism specified). I am not aware of an option that would allow the external table to automatically add new data files as the partition size increased, so you'd likely have to do some sort computation about the expected size of the dump file in order to figure out how many files to create.
    Justin

  • 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?

  • 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 while fetching data from OWB Client using External Table.

    Dear All,
    I am using Oracle Warehouse Builder 11g & Oracle 10gR2 as repository database on Windows 2000 Server.
    I facing some issue in fetching data from a Flat File using external table from OWB Client.
    I have perform all the steps without any error but when I try to view the data, I got the following error.
    ======================================
    RA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file expense_categories.csv in SOURCE_LOCATION not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    java.sql.SQLException: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file expense_categories.csv in SOURCE_LOCATION not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
         at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:774)
         at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:849)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1377)
         at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:386)
         at oracle.wh.ui.owbcommon.QueryResult.<init>(QueryResult.java:18)
         at oracle.wh.ui.owbcommon.dataviewer.relational.OracleQueryResult.<init>(OracleDVTableModel.java:48)
         at oracle.wh.ui.owbcommon.dataviewer.relational.OracleDVTableModel.doFetch(OracleDVTableModel.java:20)
         at oracle.wh.ui.owbcommon.dataviewer.RDVTableModel.fetch(RDVTableModel.java:46)
         at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerPanel$1.actionPerformed(BaseDataViewerPanel.java:218)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:282)
         at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerPanel.executeQuery(BaseDataViewerPanel.java:493)
         at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerEditor.init(BaseDataViewerEditor.java:116)
         at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerEditor.<init>(BaseDataViewerEditor.java:58)
         at oracle.wh.ui.owbcommon.dataviewer.relational.DataViewerEditor.<init>(DataViewerEditor.java:16)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at oracle.wh.ui.owbcommon.IdeUtils._tryLaunchEditorByClass(IdeUtils.java:1412)
         at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1349)
         at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1367)
         at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:869)
         at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:856)
         at oracle.wh.ui.console.commands.DataViewerCmd.performAction(DataViewerCmd.java:19)
         at oracle.wh.ui.console.commands.TreeMenuHandler$1.run(TreeMenuHandler.java:188)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    ===========================
    In the error it is showing that file expense_categories.csv in SOURCE_LOCATION not found but I am 100% sure that file is very much there.
    Is anybody face the same issue?
    Do we need to configure something before loading data from a flat file from OWB Client?
    Any help would higly appreciable.
    Regards,
    Manmohan Sharma

    Hi Detlef / Gowtham,
    Now I am able to fetch data from flat files from OWB Server as well as OWB Client.
    One way I have achieved as suggested by you
    1) Creating location on the OWB Client
    2) Samples the files at client
    3) Created & Configured external table
    4) Copy all flat files on OWB Server
    5) Updated the location which I created at the client.
    Other way
    1) Creating location on the OWB Client
    2) Samples the files at client
    3) Created & Configured external table
    4) Copied flat files on the sever in same drive & directory . like if my all flat files are on C:\data at OWB Client then I copied flat file C:\data on the OWB Server. But this is feasible for Non-Windows.
    Hence my problem solved.
    Thanks a lot.
    Regards,
    Manmohan

  • Error while loading  data into External table from the flat files

    HI ,
    We have a data load in our project which feeds the oracle external tables with the data from the Flat Files(.bcp files) in unix.
    While loading the data, we are encountering the following error.
    Error occured (Error Code : -29913 and Error Message : ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: un) while loading data into table_ext
    Please let us know what needs to be done in this case to solve this problem.
    Thanks,
    Kartheek

    Kartheek,
    I used Google (mine still works).... please check those links:
    http://oraclequirks.blogspot.com/2008/07/ora-29400-data-cartridge-error.html
    http://jonathanlewis.wordpress.com/2011/02/15/ora-29913/
    HTH,
    Thierry

Maybe you are looking for

  • BAPI_PROJECT_MAINTAIN

    I am getting an error in BAPI_PROJECT_MAINTAIN while trying to add an Activity to an existing Network.  The Activity number does not exist for the network so I am assuming that CREATE is the best Method to use.  Initially, this error was caused by a

  • US / CAN Workshops -- feedback?

    As announced at the Congress, the North American UA program will be offering workshops at three locations in June and July.  The date and locations below are firm.  The topics taught at each location and the class length are still flexible -- we woul

  • Error using SAP datasource for OmniPortlet

    I have installed and configured PDK 9.0.4.0.2 on my iAS 10g system. Also installed and configured the SAP datasource for OmniPortlet. After I put an OmniPortlet portlet on a portal page then I begin to define the defaults for the portlet instance, I

  • Error Message on query of the cube 0PUR_C01

    Hi Gurus, I am executing the standard query 0PUR_C01_Q0004 on cube 0PUR_C01 (Purchasing). For some results lines I see the following message "No calc possible" on key figures values. Has anybody seen this error before?? I will really appreciate any h

  • Lightroom processed files crash Bridge

    I have been experiencing Bridge crashes when I try to open folders with Lightroom processed files in them. I tested this with all the folders of CR2 processed files. When the folder is chosen and as Bridge begins to process the files, it crashes. Mov