Error: while Selecting External table

Hi everybody,
When i Select an external table i am getting this error. The file is like this:
229|1|506460|SIGROUP |4890|100|0|0|10:31:01|2007/12/17|M009|20191395001|L|B|12|CLIENT|INE547A01012|10:31:00|
229|1|506460|SIGROUP |4900|900|0|0|10:31:01|2007/12/17|M009|20191395001|L|B|13|CLIENT|INE547A01012|10:31:00|
229|1|500407|SWARAJENG |21400|300|0|0|10:33:28|2007/12/17|OWN|20191397001|L|B|154|OWN|INE277A01016|10:33:28|
I had created the Table like this:
SQL> CREATE TABLE TEMP_SAUDA
2 (S_A VARCHAR2(20),
3 S_TYPE VARCHAR2(20),
4 S_CO VARCHAR2(20),
5 S_CONAME VARCHAR2(40),
6 S_RATE NUMBER,
7 S_QTY NUMBER,
8 S_G NUMBER,
9 S_H NUMBER,
10 S_TIME TIMESTAMP WITH TIME ZONE,
11 S_DATE DATE,
12 S_PCODE VARCHAR2(20),
13 S_SETNO VARCHAR2(20),
14 S_M VARCHAR2(20),
15 S_N VARCHAR2(20),
16 S_O VARCHAR2(20),
17 S_CLIENTOWN VARCHAR2(10),
18 S_ISIN VARCHAR2(12),
19 S_ORDER_TIME TIMESTAMP WITH TIME ZONE
20 )
21 ORGANIZATION EXTERNAL
22 (TYPE oracle_loader
23 DEFAULT DIRECTORY BSE17122007
24 ACCESS PARAMETERS
25 (RECORDS DELIMITED BY NEWLINE
26 FIELDS
27 (
28 S_A CHAR(20),
29 S_TYPE CHAR(20),
30 S_CO CHAR(20),
31 S_CONAME CHAR(20),
32 S_RATE CHAR(20),
33 S_QTY CHAR(20),
34 S_G CHAR(20),
35 S_H CHAR(20),
36 S_TIME CHAR(35) date_format TIMESTAMP WITH TIMEZONE mask "DD-MON-RR HH.MI.SSXFF AM TZH:TZM
37 S_DATE CHAR(22) date_format DATE mask "mm/dd/yyyy hh:mi:ss ",
38 S_PCODE CHAR(20),
39 S_SETNO CHAR(20),
40 S_M CHAR(20),
41 S_N CHAR(20),
42 S_O CHAR(20),
43 S_CLIENTOWN CHAR(20),
44 S_ISIN CHAR(20),
45 S_ORDER_TIME date_format TIMESTAMP WITH TIMEZONE mask "DD-MON-RR HH.MI.SSXFF AM TZH:TZM"
46 )
47 )
48 location (BSE17122007:'BR171207.DAT')
49 )
50 ;
Table created.
SQL> SELECT * FROM TEMP_SAUDA;
SELECT * FROM TEMP_SAUDA
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 "date_format": expecting one of: "binary_double,
binary_float, comma, char, date, defaultif, decimal, double, float, integer, (,
nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned,
varrawc, varchar, varraw, varcharc, zoned"
KUP-01007: at line 21 column 14
ORA-06512: at "SYS.ORACLE_LOADER", line 19
Is there any mistake in this table creation.
what i have to declare to the time format if the format in the file id hh:mm:ss
Thank u...!
Ravi

The output you posted is completely wrong, I could not even create the table without errors.
Try with this.
CREATE TABLE TEMP_SAUDA
(S_A VARCHAR2(20),
S_TYPE VARCHAR2(20),
S_CO VARCHAR2(20),
S_CONAME VARCHAR2(40),
S_RATE NUMBER,
S_QTY NUMBER,
S_G NUMBER,
S_H NUMBER,
S_TIME TIMESTAMP WITH TIME ZONE,
S_DATE DATE,
S_PCODE VARCHAR2(20),
S_SETNO VARCHAR2(20),
S_M VARCHAR2(20),
S_N VARCHAR2(20),
S_O VARCHAR2(20),
S_CLIENTOWN VARCHAR2(10),
S_ISIN VARCHAR2(12),
S_ORDER_TIME TIMESTAMP WITH TIME ZONE
ORGANIZATION EXTERNAL
(TYPE oracle_loader
DEFAULT DIRECTORY BSE17122007
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
FIELDS terminated by "|"
S_A CHAR(20),
S_TYPE CHAR(20),
S_CO CHAR(20),
S_CONAME CHAR(20),
S_RATE CHAR(20),
S_QTY CHAR(20),
S_G CHAR(20),
S_H CHAR(20),
S_TIME CHAR(8) date_format TIMESTAMP WITH TIMEZONE mask "HH.MI.SSXFF AM TZH:TZM",
S_DATE CHAR(10) date_format DATE mask "yyyy/mm/dd",
S_PCODE CHAR(20),
S_SETNO CHAR(20),
S_M CHAR(20),
S_N CHAR(20),
S_O CHAR(20),
S_CLIENTOWN CHAR(20),
S_ISIN CHAR(20),
S_ORDER_TIME char(8) date_format TIMESTAMP WITH TIMEZONE mask "HH.MI.SSXFF AM TZH:TZM"
location (BSE17122007:'BR171207.DAT')
;With this you get:
SQL> col s_time format a40
SQL> col s_date format a40
SQL> col s_order_time format a40
SQL> r
  1* select s_time,s_date,s_order_time from temp_sauda
S_TIME                                   S_DATE                                   S_ORDER_TIME
01-JAN-08 10.31.01.000000 AM +00:00      17.DEC.2007 00:00:00                     01-JAN-08 10.31.00.000000 AM +00:00
01-JAN-08 10.31.01.000000 AM +00:00      17.DEC.2007 00:00:00                     01-JAN-08 10.31.00.000000 AM +00:00
01-JAN-08 10.33.28.000000 AM +00:00      17.DEC.2007 00:00:00                     01-JAN-08 10.33.28.000000 AM +00:00Be aware that your file does not contain date information for the time fields, so as you see above it is defaulted to 01-JAN-08 for the S_TIME and S_ORDER_TIME column.

Similar Messages

  • Error while creating external table

    Hi i tried to create external table. The table is created but while selecting that table it is throwing below errors
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19I've created temp directory in window under oracle directory " C:\oracle\product\10.2.0\temp"
    In the temp directory i've a text file countries1.txt
    the text file has the below information
    ENG,England,English
    SCO,Scotland,English
    IRE,Ireland,English
    WAL,Wales,WelshI've connected to system user and created one directory and granted the read and write permissions to user SCOTT.
    SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp\';
    Directory created.
    SQL> grant read,write on directory ext_tables to scott;
    Grant succeeded.The creation of external table query is
    CREATE TABLE countries_ext (
      country_code      VARCHAR2(5),
      country_name      VARCHAR2(50),
      country_language  VARCHAR2(50)
    ORGANIZATION EXTERNAL (
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY ext_tables
      ACCESS PARAMETERS (
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        MISSING FIELD VALUES ARE NULL
          country_code      CHAR(5),
          country_name      CHAR(50),
          country_language  CHAR(50)
      LOCATION ('Countries1.txt')
    PARALLEL 5
    REJECT LIMIT UNLIMITED;And the error is
    SQL> select *from countries_ext;
    select *from countries_ext
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    SQL> Please help me in this

    You are missing something. Most probably the file does not exists in your specified path. This is working in my 10.2.0.3
    Step1: Check the file is actually there.
    C:\oracle\product\10.2.0>mkdir temp
    C:\oracle\product\10.2.0>cd temp
    C:\oracle\product\10.2.0\temp>dir
    Volume in drive C is C_Drive
    Volume Serial Number is 8A93-1441
    Directory of C:\oracle\product\10.2.0\temp
    07/30/2011  12:00 PM    <DIR>          .
    07/30/2011  12:00 PM    <DIR>          ..
    07/30/2011  12:00 PM                79 countries1.txt
                   1 File(s)             79 bytes
                   2 Dir(s)  50,110,582,784 bytes free
    C:\oracle\product\10.2.0\temp>type countries1.txt
    ENG,England,English
    SCO,Scotland,English
    IRE,Ireland,English
    WAL,Wales,Welsh
    C:\oracle\product\10.2.0\temp>Step 2: Creating the directory object.
    SQL> show user
    USER is "SYS"
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp';
    Directory created.
    SQL> grant read,write on directory ext_tables to scott;
    Grant succeeded.
    SQL>Step 3: Table definition.
    C:\>sqlplus scott@orclsb/tiger
    SQL*Plus: Release 10.1.0.4.2 - Production on Sat Jul 30 12:04:24 2011
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> CREATE TABLE countries_ext (
      2    country_code      VARCHAR2(5),
      3    country_name      VARCHAR2(50),
      4    country_language  VARCHAR2(50)
      5  )
      6  ORGANIZATION EXTERNAL (
      7    TYPE ORACLE_LOADER
      8    DEFAULT DIRECTORY ext_tables
      9    ACCESS PARAMETERS (
    10      RECORDS DELIMITED BY NEWLINE
    11      FIELDS TERMINATED BY ','
    12      MISSING FIELD VALUES ARE NULL
    13      (
    14        country_code      CHAR(5),
    15        country_name      CHAR(50),
    16        country_language  CHAR(50)
    17      )
    18    )
    19    LOCATION ('Countries1.txt')
    20  )
    21  PARALLEL 5
    22  REJECT LIMIT UNLIMITED;
    Table created.
    SQL> SELECT * FROM countries_ext;
    COUNT COUNTRY_NAME
    COUNTRY_LANGUAGE
    ENG   England
    English
    SCO   Scotland
    English
    IRE   Ireland
    English
    COUNT COUNTRY_NAME
    COUNTRY_LANGUAGE
    WAL   Wales
    Welsh

  • Error while accessing External table.

    Hi All,
    While accessing oracle external table. I created the table with the following query.
    CREATE OR REPLACE DIRECTORY load_dir AS '\\oraaps\Exceldata\'
    CREATE TABLE my_sheet
    DEPTNO NUMBER,
    DNAME VARCHAR2(14),
    LOC VARCHAR2(13)
    ORGANIZATION EXTERNAL
    TYPE oracle_loader
    DEFAULT DIRECTORY load_dir
    ACCESS PARAMETERS
    RECORDS DELIMITED BY NEWLINE
    badfile load_dir:'my_sheet.bad'
    logfile load_dir:'my_sheet.log'
    FIELDS TERMINATED BY ','
    MISSING FIELD VALUES ARE NULL
    DEPTNO,
    DNAME,
    LOC
    LOCATION ('my_sheet.csv')
    )REJECT LIMIT UNLIMITED;
    I am sure that the table and the directory got created because i can see the table in the SQL developer. But whenever i say select * from my_sheet i'm getting the following error in the log file.
    LOG file opened at 10/16/06 14:48:21
    Field Definitions for table mysheet
    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:
    DEPTNO NUMBER Terminated by ","
    Trim whitespace same as SQL Loader
    DNAME VARCHAR2(14),
    Terminated by ","
    Trim whitespace same as SQL Loader
    LOC VARCHAR2(13)
    Terminated by ","
    Trim whitespace same as SQL Loader
    KUP-04001: error opening file \\oraaps\Exceldata\mysheet.csv
    KUP-04017: OS message: The data is invalid.
    Please do reply..Its urgent from my project deliverable point of view.
    Any help appreciated.
    Thanks and Regards.
    V.Venkateswara Rao

    It is not an Oracle error/problem. The error message is quite specific ito the actual root cause of the problem:
    KUP-04001: error opening file \\oraaps\Exceldata\mysheet.csv
    KUP-04017: OS message: The data is invalid.
    These are operating system errors. The operating system cannot access/open/read the specific UNC and/or file.
    Fix it at o/s level and it will work when Oracle needs to make that o/s call.

  • KUP-01005 error when selecting external table

    Hi All,
    My name is arun. I am having trouble resolving the following error. I tried to google, search oracle forum but no avail. I would really appreciate some help? I hope someone point me to the right direction with this problem. Thank you.
    Scenario :
    I have done the following :
    1. Created the external directories using a user account(KDEV199). However by default its owned by SYS user.
    2. Created the table necessary for selection. This was done by user account(KDEV199)
    3. I have granted the folder privileges owned by oinstall:oracle where the 2 physical files exists. Thus all the files is owned by oracle. This was done at OS layer.
    4. I have created 2 files necessary to extract data & read in oracle. This was done at OS layer.
    The problem is that i have the following when i try to select the table :
    SQL> select * from TEXN_IGM_MST;
    select * from TEXN_IGM_MST
    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 "minussign": expecting one of:
    "double-quoted-string, identifier, single-quoted-string"
    KUP-01007: at line 7 column 10
    This script used to create the table :
    --Create External Table
    CREATE TABLE texn_igm_mst
    COMP_NO CHAR(2),
    POL_NO CHAR(10),
    WRITING_AGENCY_NO_1 CHAR(10),
    WRITING_AGENT_NO_1 CHAR(10),
    WRITING_AGENCY_NO_2 CHAR(10),
    WRITING_AGENT_NO_2 CHAR(10),
    POL_STS_CDE CHAR(4),
    STS_CHNG_DT DATE,
    POL_DTE DATE,
    PAY_UP_DTE DATE,
    PAY_TO_DTE CHAR(10),
    MATURE_DTE DATE,
    PAY_MODE_CDE CHAR(2),
    PAY_METHOD_CDE CHAR(1),
    MODAL_PREM_AMT NUMBER(15,2),
    POL_CUR CHAR(2),
    NFO_CDE CHAR(1),
    DIVD_OPTION_CDE_1 CHAR(1),
    DIVD_OPTION_CDE_2 CHAR(1),
    OTHER_OPTION_CDE_1 CHAR(1),
    OTHER_OPTION_CDE_2 CHAR(1),
    RESTRICT_CDE CHAR(20),
    NEXT_MODAL_PREM NUMBER(15,2),
    SUSPEND_CDE CHAR(1),
    EXTRACT_DTE DATE,
    REASON_CDE CHAR(3),
    LINE_OF_BUSS CHAR(1),
    BILL_TO_DTE CHAR(10),
    DUE_DAY NUMBER(3),
    DAY_USE CHAR(1),
    PAR_TYPE CHAR(1),
    ISSUE_STATE CHAR(2),
    MED_CDE CHAR(1),
    RACE_CDE CHAR(1),
    ADMIT_CDE CHAR(1),
    REPT_STATE CHAR(2),
    COLL_OFF CHAR(2),
    WRITING_AGENCY CHAR(10),
    LAST_ANN_PROC CHAR(3),
    TIMESTAMP DATE,
    SPND_EFF_DT DATE,
    SPND_TRMN_DT DATE,
    SPND_USER_ID CHAR(8),
    CMPLN_AGT_ID CHAR(10),
    TOTAL_CWA DECIMAL(17),
    TOTAL_CWA_DT DATE,
    DELIVERY_DT DATE,
    REINSURED_CDE CHAR(1),
    SERV_AGENCY CHAR(10),
    ST_CODE CHAR(1),
    NFO_RULE CHAR(1),
    CSTAT_REASN_CD CHAR(2),
    REJ_REASN_CD CHAR(2)
    ORGANIZATION EXTERNAL
    TYPE oracle_loader
    DEFAULT DIRECTORY external_dir_clmlog
    ACCESS PARAMETERS
    records delimited by newline
    BADFILE external_dir_clmlog:'VILFPM1.BAD'
    LOGFILE external_dir_clmlog:'VILFPM1.LOG'
    fields terminated by '!'
    missing field values are null
    --Column and format setting
    COMP_NO,
    POL_NO,
    WRITING_AGENCY_NO_1,
    WRITING_AGENT_NO_1,
    WRITING_AGENCY_NO_2,
    WRITING_AGENT_NO_2,
    POL_STS_CDE,
    STS_CHNG_DT CHAR date_format DATE Mask "yyyy-mm-dd",
    POL_DTE CHAR date_format DATE Mask "yyyy-mm-dd",
    PAY_UP_DTE CHAR date_format DATE Mask "yyyy-mm-dd",
    PAY_TO_DTE,
    MATURE_DTE CHAR date_format DATE Mask "yyyy-mm-dd",
    PAY_MODE_CDE,
    PAY_METHOD_CDE,
    MODAL_PREM_AMT,
    POL_CUR,
    NFO_CDE,
    DIVD_OPTION_CDE_1,
    DIVD_OPTION_CDE_2,
    OTHER_OPTION_CDE_1,
    OTHER_OPTION_CDE_2,
    RESTRICT_CDE,
    NEXT_MODAL_PREM,
    SUSPEND_CDE,
    EXTRACT_DTE CHAR date_format DATE Mask "yyyy-mm-dd",
    REASON_CDE,
    LINE_OF_BUSS,
    BILL_TO_DTE,
    DUE_DAY,
    DAY_USE,
    PAR_TYPE,
    ISSUE_STATE,
    MED_CDE,
    RACE_CDE,
    ADMIT_CDE,
    REPT_STATE,
    COLL_OFF,
    WRITING_AGENCY,
    LAST_ANN_PROC,
    TIMESTAMP CHAR date_format DATE Mask "yyyy-mm-dd-hh24.mi.ss.ffffff",
    SPND_EFF_DT CHAR date_format DATE Mask "yyyy-mm-dd",
    SPND_TRMN_DT CHAR date_format DATE Mask "yyyy-mm-dd",
    SPND_USER_ID,
    CMPLN_AGT_ID,
    TOTAL_CWA,
    TOTAL_CWA_DT CHAR date_format DATE Mask "yyyy-mm-dd",
    DELIVERY_DT CHAR date_format DATE Mask "yyyy-mm-dd",
    REINSURED_CDE,
    SERV_AGENCY,
    ST_CODE,
    NFO_RULE,
    CSTAT_REASN_CD,
    REJ_REASN_CD
    LOCATION (external_dir_clmxcom:'VILFPM1.DAT')
    DB version :
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    OS version :
    SUSE Linux Enterprise Server 11 (x86_64)
    VERSION = 11
    PATCHLEVEL = 1
    Linux KAITLSDS01 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux
    ---------------------------------------------------------------------------------------------------------------------------------------

    Pl see MOS Doc 302672.1 (Select From External Table Gives ORA-29913 ORA-29400 KUP-554 KUP-1005)
    Srini

  • Syntax Error, while Creating External Table

    Hi,
    Can anyone tell this Syntax is correct or not. And how it look like:
    CREATE TABLE emp_load (T_DATE DATE NOT NULL,
    T_NO DOUBLE PRECISION,
    T_TYPE CHAR(1),
    T_CO VARCHAR(30),
    T_CONTRACT DOUBLE PRECISION,
    T_PARTY VARCHAR(15),
    T_BILL_NO DOUBLE PRECISION,
    T_BILL_DATE DATE,
    T_QTY DOUBLE PRECISION,
    T_RATE DOUBLE PRECISION,
    T_BKG DOUBLE PRECISION NOT NULL,
    T_TAX DOUBLE PRECISION,
    T_OTHER DOUBLE PRECISION,
    T_DIV DOUBLE PRECISION,
    T_STAMPS DOUBLE PRECISION,
    T_DC_NO DOUBLE PRECISION,
    T_SPOT CHAR(2),
    T_CITY VARCHAR(3),
    T_ORDER DOUBLE PRECISION,
    T_TRADE DOUBLE PRECISION,
    T_TIME DATE,
    T_FORM CHAR(1),
    HEADER VARCHAR(2),
    T_DC_DATE DATE,
    T_POD VARCHAR(30),
    T_POD_DATE DATE,
    T_SET INTEGER,
    T_MARGIN DOUBLE PRECISION NOT NULL WITH DEFAULT,
    T_MKT_TYPE VARCHAR(3) NOT NULL,
    T_MEMBER_CODE VARCHAR(15),
    T_EXIM SMALLINT,
    T_P VARCHAR(15),
    T_C VARCHAR(30),
    T_TERM VARCHAR(8),
    T_CUST VARCHAR(12),
    T_SUBBKG DOUBLE PRECISION,
    T_BILL_TYPE VARCHAR(1),
    T_OPN_CLS DOUBLE PRECISION,
    T_AUCTION DOUBLE PRECISION,
    T_BRANCH VARCHAR(8),
    T_UNQID VARCHAR(20),
    T_SQ SMALLINT,
    T_CBKG DOUBLE PRECISION,
    T_COTHER DOUBLE PRECISION,
    T_MOD DATE,
    T_ORIG_CUST VARCHAR(20),
    T_TOT DOUBLE PRECISION,
    T_FIRM SMALLINT,
    T_ORDER_TIME DATE,
    T_NON_MT SMALLINT)
    ORGANIZATION EXTERNAL (TYPE ORACLE_LOADER DEFAULT DIRECTORY ext_tab_dir
    ACCESS PARAMETERS (RECORDS FIXED 62 FIELDS (T_DATE DATE NOT NULL,
    T_NO DOUBLE PRECISION,
    T_TYPE CHAR(1),
    T_CO VARCHAR(30),
    T_CONTRACT DOUBLE PRECISION,
    T_PARTY VARCHAR(15),
    T_BILL_NO DOUBLE PRECISION,
    T_BILL_DATE DATE,
    T_QTY DOUBLE PRECISION,
    T_RATE DOUBLE PRECISION,
    T_BKG DOUBLE PRECISION NOT NULL,
    T_TAX DOUBLE PRECISION,
    T_OTHER DOUBLE PRECISION,
    T_DIV DOUBLE PRECISION,
    T_STAMPS DOUBLE PRECISION,
    T_DC_NO DOUBLE PRECISION,
    T_SPOT CHAR(2),
    T_CITY VARCHAR(3),
    T_ORDER DOUBLE PRECISION,
    T_TRADE DOUBLE PRECISION,
    T_TIME DATE,
    T_FORM CHAR(1),
    HEADER VARCHAR(2),
    T_DC_DATE DATE,
    T_POD VARCHAR(30),
    T_POD_DATE DATE,
    T_SET INTEGER,
    T_MARGIN DOUBLE PRECISION NOT NULL WITH DEFAULT,
    T_MKT_TYPE VARCHAR(3) NOT NULL,
    T_MEMBER_CODE VARCHAR(15),
    T_EXIM SMALLINT,
    T_P VARCHAR(15),
    T_C VARCHAR(30),
    T_TERM VARCHAR(8),
    T_CUST VARCHAR(12),
    T_SUBBKG DOUBLE PRECISION,
    T_BILL_TYPE VARCHAR(1),
    T_OPN_CLS DOUBLE PRECISION,
    T_AUCTION DOUBLE PRECISION,
    T_BRANCH VARCHAR(8),
    T_UNQID VARCHAR(20),
    T_SQ SMALLINT,
    T_CBKG DOUBLE PRECISION,
    T_COTHER DOUBLE PRECISION,
    T_MOD DATE,
    T_ORIG_CUST VARCHAR(20),
    T_TOT DOUBLE PRECISION,
    T_FIRM SMALLINT,
    T_ORDER_TIME DATE,
    T_NON_MT SMALLINT))
    LOCATION ('BR271107.DAT'))
    Error at Command Line:28 Column:40
    Error report:
    SQL Error: ORA-00905: missing keyword
    00905. 00000 - "missing keyword"
    Thank u..!
    Ravi

    Where can we find that directory in the server. You have to provide for it's existence.
    So you must create C:/Oracle on the server or have your ext_tab_dir point to some existing directory on the server (better if dedicated to external tables for not creating confusion)
    You must also see to have read and write OS rights and have granted read (and write) privileges on directory ext_tab_dir to your_user_name
    Regards
    Etbin
    If you can use utl_file try to use utl_file_dir as your ext_tab_dir to perform the test => copy your file to the directory your utl_file_dir is pointing to and do select * from test
    Message was edited by: Etbin
    user596003

  • Error while importing external table

    Hello,
    I am getting the following error message when trying to import an external table:
    SQL Exception
    SQL Exception
    Repository Error:SQL Exception..
    Class Name: CacheMediator.
    Method Name: getDDEntryFromDB.
    Repository Error Message: ORA-22992: cannot use LOB locators selected from remote tables
    I am using the "import..."- function of "external tables" in warehouse target module. The external table is working correctly when accessing it via sqlplus.
    We are using owb version 10.2.0.1.
    Any help would be appreciated.
    Best regards
    Alexander

    My friends, this a documented BUG into Metalink, but there is no solution.
    I used a simple workaround:
    1. I created the external table into the database;
    2. I created the external table into the OWB repository;
    3. I DIDN'T DEPLOY THE EXTERNAL TABLE TO THE DATABASE;
    4. I used the external table into my mappings with no problems;
    5. Finishing, I deployed my mappings to the database without any errors.
    Hope to help!,
    Gustavo.

  • Error while using External Table

    Hi Guru's,
    I am using external tables in my procedure and the code to create it will be dynamically built inside the procedure itself. I have tested it so many times and it works fine only. But suddenly now it is throwing some error and i was not able to figure out the problem.
    Additional Info:
    1. I have provided the full rights to the input directory.
    2. Working in Oracle 10g release 2
    3. Unix OS in server
    4. Error description:
    << UK_TRADINGDATA_LOAD >> ABEND : <<ABEND SYS-000 >> uncatched ORACLE-error : ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file EXTRACTION COMPLETED in EXT_UK_TRADINGDATA not found
               v_ac_sql:='CREATE TABLE VLDPROCESS'||gv_ac_schema_suffix||'.EXT_UK_TRAD_'||gv_ac_machineid ||'_'||gv_ac_retailer_id||'_ADHOC'||CHR(10)
                            ||'(  AC_RETAILER_ID       VARCHAR2(2 BYTE),'||CHR(10)
                            ||'AC_DEPARTMENT_CD     VARCHAR2(20 BYTE),'||CHR(10)
                            ||'NC_PERIOD_FROM       NUMBER,'||CHR(10)
                            ||'NC_PERIOD_TO       NUMBER'||CHR(10)   
                            ||')'||CHR(10)
                            ||'ORGANIZATION EXTERNAL'||CHR(10)
                            ||'(TYPE ORACLE_LOADER'||CHR(10)
                            ||'DEFAULT DIRECTORY EXT_UK_TRADINGDATA'||CHR(10)
                            ||'ACCESS PARAMETERS'||CHR(10)
                            ||'(RECORDS DELIMITED BY NEWLINE'||CHR(10)
                            ||'badfile     '''||v_ac_failed_files||'.bad'''||CHR(10)
                            ||'discardfile '''||v_ac_failed_files||'.dis'''||CHR(10)
                            ||'logfile     '''||v_ac_failed_files||'.log'''||CHR(10)
                            ||'FIELDS'||CHR(10)
                            ||'('||CHR(10)
                            ||'AC_RETAILER_ID   position( 1: 2) char( 2),'||CHR(10)
                            ||'AC_DEPARTMENT_CD position( 3:22) char(20),'||CHR(10)
                            ||'NC_PERIOD_FROM   position(23:29) char( 7),'||CHR(10)
                            ||'NC_PERIOD_TO     position(30:36) char( 7)'||CHR(10)     
                            ||')'||CHR(10)
                            ||')'||CHR(10)
                            ||'LOCATION ('''||v_ac_file_name ||''')'||CHR(10)
                            ||')'||CHR(10)
                            ||'REJECT LIMIT 100'||CHR(10)
                            ||'NOPARALLEL'||CHR(10)
                            ||'NOMONITORING';  
               EXECUTE IMMEDIATE v_ac_sql; Kindly help me!
    With Regards,
    VJ

    Sometimes when troubleshooting issues like this it is helpful to output the dynamic SQL generated to the screen or spool it to a text file. From there it's usually easy to determine where the problem lies.
    If you can provide that one of the forum members can figure it out.

  • OWB 10g R1 : Error  while accessing External Table

    Dear All,
    We have created few external and registered them using os user oracle.
    Now , we have changed to user 'oratester' and reregistered the location.
    oratester is having all the rights on the folder which the external table is refering.
    Still , we are facing with the following error:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout ORA-29400: data cartridge error KUP-04063: unable to open log file log_test.txt OS error Permission denied
    If anybody is having any idea how to solve this error, please reply
    Thanks in Advance
    malle

    yah. Ive configured the accessing parameters.
    The code generated , has the following
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY NEWLINE
    CHARACTERSET WE8MSWIN1252
    STRING SIZES ARE IN BYTES
    BADFILE ALL_DB_LOC_CMN_FLS_LOG_LOC:'bad_central.txt'
    DISCARDFILE ALL_DB_LOC_CMN_FLS_LOG_LOC:'discard_central.txt'
    LOGFILE ALL_DB_LOC_CMN_FLS_LOG_LOC:'log_central.txt'
    FIELDS
    TERMINATED BY '~'
    OPTIONALLY ENCLOSED BY '"' AND '"'
    Which OS does oracle use to create log/bad files?

  • Getting an error while selecting from table having CLOB column.

    Hi All,
    I have below table created in My oracle database version Oracle Database 11g Enterprise Edition Release 11.2.0.1.0.
    CREATE TABLE my_clob -- Dummy table created
    (DataBody CLOB);
    Current Database Character set - WE8MSWIN1250.
    On the front end of my application, I have one form through which I can save/edit data in the above table. If I'm creating one new entry in the above table then it first check with existing record to avoid the duplicate entry and the this point application create the below select statement on the above table and return the error "ORA-00932: inconsistent data types: expected - got CLOB".
    I can not change the sql statement.
    SELECT * FROM my_clob WHERE databody IS NULL OR databody ='';
    Even when I run the same statement on my DB server I’m getting the same error. Shown below
    SQL> SELECT * FROM my_clob WHERE databody IS NULL OR databody ='';
    SELECT * FROM my_clob WHERE databody IS NULL OR databody =''
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected - got CLOB
    SQL>
    Is there anything with OraOLEDB which causing this error? Please help me out to get rid of this error.
    Thanks,
    Santosh

    You cannot compare directly a CLOB column with a VARCHAR2 column. In your case you don't need to do such comparison because Oracle consider zero length strings as null values:
    SQL> create table my_clob(data int, databody clob);
    Table created.
    SQL> insert into my_clob values(1, null);
    1 row created.
    SQL> insert into my_clob values(2, '');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from my_clob where databody is null;
          DATA
    DATABODY
             1
             2About null values in Oracle, please read http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements005.htm#SQLRF30037.

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

  • Getting javascript error while selecting the Recipients in OBIEE delivers.

    Hi All,
    I am working on OBIEE from quite a long time, but recently I came across a error while selecting the Recipients in Recipients list of OBIEE delivers.
    Making it more comprehensive, when I try to create an ibot , after entering all necessary information when I select Recipients in Recipients list and click on ok. I get a JavaScript error "null" is null or an object. The surprising thing is when i select cancel it works as ok.
    Any help will be highly appreciated
    Thanks,
    Jyoti
    Message was edited by:
    user616430

    I think you dont have a field named /BIC/XXXXXX in the table from which you are trying to fetch the data. Chech the spelling of the field name and table name.

  • Error while selecting entity for composantEO

    Hi,
    Briefly, I do an example of displaying a list of components (and already it works properly), but when I added a link to the removal of components I have encountered an error
    Voila details
    function code delete
    public void deleteComposantMethod(String action,String param)
    System.out.println("Now we are inside deleteComposantMethod");
    System.out.println("we search composant with numcomp : "+param);
    ComposantVOImpl inst=getComposantVO1();
    Row row[]=inst.getAllRowsInRange();
    for(int i=0;i<row.length;i++)
    ComposantVORowImpl rowi=(ComposantVORowImpl)row;
    System.out.println("checking the composant ===> "+rowi.getNumcomp());
    if(param.equals(rowi.getNumcomp().toString()))
    try{
    rowi.remove();
    getOADBTransaction().commit();
    System.out.println("Deleting succes");
    catch(Exception ex)
    System.out.println("error : \n"+ex.getMessage());
    return;
    in the browser page component disapru it seems that it works correctly, but nothing changes at data base and voila the error message I get from embedder OC4J server log
    Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = oracle.jbo.DMLException: JBO-26080: Error while selecting entity for ComposantEO
    thanks
    Please note: although no board code and smiley buttons are shown, they are still usable.
    thanks

    Hi,
    for those who have encountered the same problem as me, you should check that the table name sql query is of the form Name_Schema.Name_Table.
    For this right click on the entity in the workspace> edit entity> Database Objects> Schema Objects and add the schema name before table name( Name_Schema.Name_Table).
    thanks,

  • Error while selecting entity

    Hi
    I keep getting the "JBO-26080: Error while selecting entity for Units" error. Below is the query in my View Object. If I remove the Units(Enitty) from the query it works fine but I need to have that in the query. This error occurs only when I do "Reset" on the screen which in turn calls "getSearchProgramView().getCurrentRow().refresh(Row.REFRESH_WITH_DB_FORGET_CHANGES);"
    Can some one explain how to get rid of this problem? When I run the query in TOAD it works fine.
    SELECT Programs.PROGRAM_ID,
    Programs.CATEGORY,
    Programs.NAME,
    Programs.PROGRAM_COORDINATOR_ID,
    Programs.PROGRAM_ASSISTANT_ID,
    Programs.MANAGING_UNIT_ABBR,
    Programs.CREATED_BY,
    Programs.CREATED_DATE,
    Programs.LAST_UPDATED_BY,
    Programs.LAST_UPDATED_DATE,
    Persons.PERSON_ID,
    Persons.USER_NAME,
    Persons.FIRST_NAME,
    Persons.LAST_NAME,
    Persons1.PERSON_ID AS PERSON_ID1,
    Persons1.USER_NAME AS USER_NAME1,
    Persons1.FIRST_NAME AS FIRST_NAME1,
    Persons1.LAST_NAME AS LAST_NAME1,
    Categories.NAME AS NAME2,
    Categories.CODE AS CODE1,
    Units.DESCRIPTION,
    Units.CODE
    FROM PROGRAMS Programs, PERSONS Persons, PERSONS Persons1, CATEGORIES Categories, UNITS Units
    WHERE ((Programs.PROGRAM_COORDINATOR_ID = Persons.PERSON_ID(+))
    AND (Programs.PROGRAM_ASSISTANT_ID = Persons1.PERSON_ID(+))
    AND (Programs.CATEGORY = Categories.CODE(+))
    AND (Programs.MANAGING_UNIT_ABBR = Units.CODE(+)))
    Thanks

    Hi,
    for those who have encountered the same problem as me, you should check that the table name sql query is of the form Name_Schema.Name_Table.
    For this right click on the entity in the workspace> edit entity> Database Objects> Schema Objects and add the schema name before table name( Name_Schema.Name_Table).
    thanks,

  • Xml parsing error while selecting whole result set for sql query

    Hi All,
    I am having xml parsing error while selecting whole query result set. The data is coming fine for default result set of 50 rows.
    My exception is below.
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00234: namespace prefix "xsi" is not declared
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1
    *31011. 00000 - "XML parsing failed"*
    **Cause: XML parser returned an error while trying to parse the document.*
    **Action: Check if the document to be parsed is valid.*
    My sql query is below that is giving results for default result set of 50 rows.
    select extract(xmlType(clob_xml_colm_name), '//v2:node1//childnode/text()','xmlns:v2="namespace_url"').getStringVal()  from table_name
    My sql developer version is below.
    Java(TM) Platform     1.7.0_04
    Oracle IDE     3.1.07.42
    Versioning Support     3.1.07.42
    My database version is below.
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit
    Please could any one help me urgently as the sql query is supposed to be correct as it is returning query results, but the problem happening when i try to select whole result set.
    Thanks and regards,

    What does the XML look like? It appears that some of the supposed XML stored as a CLOB is not really valid XML. Find the row in the table that is causing your issue and review the "XML" in it.

  • Problem while selecting a table after creating the dblink

    Hi,
    We have created the dblink for oracle to sql server and it created successfully,
    But while selecting the table from oracle we are getting the below issue,
    select * from "sysdiagrams"@omniyat;
    ERROR at line 1:
    ORA-00942: table or view does not exist
    [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
    'sysdiagrams'. {42S02,NativeErr = 208}[Microsoft][ODBC SQL Server Driver][SQL
    Server]Statement(s) could not be prepared. {42000,NativeErr = 8180}
    ORA-02063: preceding 2 lines from OMNIYAT
    Kindly provide us the solution to resolve this issue.
    Regards
    Sham

    Please see:
    Odbc Connection From Oracle To SQL*Server Fails With Errors Ora-28546 and Ora-2063 When Using Connection via Database Link. (Doc ID 1389492.1)
    To BottomTo Bottom
    Error 08001,NativeErr = 11 Instance Invalid or Not Running Connecting to SQL*Server Using Dg4MSQL (Doc ID 1349023.1)
    How to Resolve Common Errors Encountered while using Database Gateways (DG4IFMX, Dg4MSQL, DG4SYBS), DG4ODBC or Generic Connectivity (Doc ID 234517.1)
    Thanks,
    Hussein

Maybe you are looking for