No external table data

I created an external table without errors, but when I try to only publish sql on the external table, there is no data. This is a subset of my data and the sql code used to create the external table. 10.2.0.2 on aix 5.2 64 bit.

"BoxC_SL.lwl" | 106 | "" tzdpship52 "|" 1. 1. 01/28/2008 0:00:00 | 12/30/1899-09:56:03 |
"Genshp_SL.lwl" | 106 | "" tzdpship52 "|" 1. 1. 01/28/2008 0:00:00 | 12/30/1899-09:56:04 |
"TRLABS - 001B_600.lwl | 126. "\\Ibm1\tzsgprod63"|2|1|1/28/2008 0:00:00 | 12/30/1899-09:56:08 | "14928758" | " "89-5425, 04" | "
"PalC_SL.lwl" | 106 | "" tzdpship52 "|" 1. 1. 01/28/2008 0:00:00 | 12/30/1899-09:56:11 |
"SSCC_SL.lwl" | 106 | "" tzdpship52 "|" 1. 1. 01/28/2008 0:00:00 | 12/30/1899-09:56:12 |



CREATE TABLE 'DMR '. "" LABEL ".
(VARCHAR2 (100) "LABEL_NAME")
NUMBER OF "PRINTER_NUM."
VARCHAR2 (100) "PRINTER_NAME,"
NUMBER OF "QUANTITY."
NUMBER OF "DUPLICATES"
DATE OF THE "PRINT_DATE."
TIMESTAMP OF the 'PRINT_TIME. "
'LOT' NUMBER,
'PARTY' VARCHAR (25),
'BATCH' VARCHAR (25),
NUMBER OF "WONUM."
'ITEM' VARCHAR (25)
)
EXTERNAL ORGANIZATION
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY 'LISTENER_LOG_DIR '.
ACCESS SETTINGS
(records delimited by newline
nobadfile
nologfile
nodiscardfile
fields finished by "|" lrtrim
missing field values are null
(
label_name,
printer_num,
printer_name,
quantity,
duplicates,
print_date tank (8) date_format
mask "MM/DD/YY", the date
print_time (8) char date_format
"HH24:MI:SS", of the date mask
A lot
part,
batch,
wonum,
Agenda
)
)
LOCATION
("AUDIT_001.txt"
)
)
REJECT LIMIT UNLIMITED;



Table created.

sys@DMRDEV > select * from dmr.labels where rownum < 10;

no selected line

sys@DMRDEV > select count (*) in the dmr.labels;

COUNT (*)
----------
0

Hello

Here go us

SQL > drop table t11.

Deleted table.

SQL >
SQL > create table t11)
VARCHAR2 (20) 2 'LABEL_NAME. "
NUMBER 3 "PRINTER_NUM."
VARCHAR2 (20) 4 "PRINTER_NAME,"
NUMBER 5 "QTY."
NUMBER 6 "DUPLICATES."
Date of 7 "PRINT_DATE."
8 'PRINT_TIME"STAMP
NUMBER 9 "BATCH."
VARCHAR (25) 10 'PART. "
11 'BATCH' VARCHAR (25),
NUMBER 12 "WONUM."
13 'ITEM' VARCHAR (25)
14)
15 external organization)
16 type oracle_loader
Default directory 17 LISTENER_LOG_DIR
(settings) access 18
19 records delimited by 0 x, 0 'a '.
' 20 fields completed by "|" possibly provided by ' "'
21 lack of 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"."
Mask of timestamp DATE_FORMAT 29 "PRINT_TIME" tank (25) "HH24:MI:SS / MM/DD/YYYY."
30 'BATCH '.
31 'PART. "
32 "BATCH."
33 "WONUM."
34 "ITEM.
35)
36)
location 37 ("holidays.txt")
38)
39 reject limit unlimited;

Table created.

SQL >

I displays the count only since you can select query * of the t11 and check... :-)

SQL > select count (*) of t11.

COUNT (*)
----------
5

"' Change the data as follows:-Remove * *"

BoxC_SL.lwl|106|tzdpship52|1|1|01/5/2008|12/30/1899 09:56:03 |
Genshp_SL. LWL | 106 | tzdpship52 | 1 | 1: 01/28/2008: 12/30/1899-09:56:04 |
PalC_SL.lwl|106|tzdpship52|1|1|1/28/2008|12/30/1899 09:56:11 |
SSCC_SL. LWL | 106 | tzdpship52 | 1 | 1 | 1/28/2008: 12/30/1899-09:56:12 |
TRLAB-001B_600.LWL|126|\\Ibm1\tzsgprod63|2|1|1/28/2008|12/30/1899 09:56:08 | 14928758 | 89 - 5425.04 |

Satisfied... Answer question correct... ;-)

-Pounet

Tags: Database

Similar Questions

  • External table - date for 20120802032917000 mask

    Hello

    I have a flat file (separator: tab), which has value of date as 20120802032917000 and I try to use the external table but not return all values below. What I am doing wrong.

    create the table xtern_bond_issue_data
    (
    issuelastUpdatedTime timestamp
    )
    external organization
    (
    the default directory xtern_bond_issue_data_dir
    access settings
    (
    records delimited by newline
    BadFile xtern_bond_issue_data_dir: 'xtern_bond_issue_data.bad'
    xtern_bond_issue_data_dir log file: 'xtern_bond_issue_data.log'
    jump 1
    fields terminated by '\t '.
    MISSING FIELD VALUES ARE NULL
    (
    issuelastUpdatedTime TANK (17) DATE_FORMAT TIMESTAMP MASK "YYYYMMDDHHMISSSSS".
    )
    )
    location ("AMER_20120702_BOND_ISSUE.dat")
    )
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    ;

    Thank you
    Kalai

    Hi, Kalai,

    951307 wrote:
    ... issuelastUpdatedTime TANK (17) DATE_FORMAT TIMESTAMP MASK "YYYYMMDDHHMISSSSS".

    I think the desired format is

    YYYYMMDDHH24MISSFF
    

    JACKY is the number of seconds since the start of the day : 17000 seconds after the beginning of a day is 04:43:20. You probably wouldn't SSSSS if you also use HH (or HH24) or MI.
    If 17000 means 17,000 seconds since the start of the minute , then use SSFF. FF is for the fractional part of the second, no matter how many numbers that is.

  • external table data with several locations pump

    Hello
    I'm on:
    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - 64biit
    SunOS 5.10

    I am trying to create a table of data pump external at the same time, with the location of the files previously created using pump.
    This is the same as the example given in step 10-13 here:
    http://docs.Oracle.com/CD/B19306_01/server.102/b14215/et_dp_driver.htm#i1007502

    But when I do this and select all the lines in the resulting table, I get the error:

    ORA-29913: error in executing ODCIEXTTABLEFETCH legend
    ORA-29400: data cartridge error
    KUP-11011: file / < filepath > sys_tables.dmp is not valid for this load operation
    ORA-06512: at "SYS." ORACLE_DATAPUMP', line 52

    Can anyone help?
    Here is a script of what I do...


    create the directory message_archive_dir as ' / your/path/directory "; -change default directory
    -chmod 777 your way

    create the sys_tables table
    external organization
    (type ORACLE_DATAPUMP
    THE DEFAULT DIRECTORY MESSAGE_ARCHIVE_DIR
    LOCATION ("sys_tables.dmp"))
    AS
    Select object_id, object_type
    of object
    where owner = 'SYS '.
    and object_type = 'TABLE '.
    and rownum < 11;

    create the table sys_indexes
    external organization
    (type ORACLE_DATAPUMP
    THE DEFAULT DIRECTORY MESSAGE_ARCHIVE_DIR
    LOCATION ("sys_indexes.dmp"))
    AS
    Select object_id, object_type
    of object
    where owner = 'SYS '.
    and object_type = 'INDEX '.
    and rownum < 11;

    Select * from sys_tables
    Union
    Select * from sys_indexes;

    -all 20 rows returned!
    -now I combine the two dmp files in a single table...

    create the table sys_objects
    (
    object_id NUMBER (14).
    object_type VARCHAR2 (30)
    )
    EXTERNAL ORGANIZATION
    (
    TYPE ORACLE_DATAPUMP
    THE DEFAULT DIRECTORY MESSAGE_ARCHIVE_DIR
    LOCATION ('sys_indexes.dmp', 'sys_tables.dmp')
    );

    Select *.
    of sys_objects
    where rownum = 1;

    -ok returnes one line (one of the dmp files work)
    --Choose so all lines...

    Select *.
    of sys_objects;

    ORA-29913: error in executing ODCIEXTTABLEFETCH legend
    ORA-29400: data cartridge error
    KUP-11011: file / < filepath > sys_tables.dmp is not valid for this load operation
    ORA-06512: at "SYS." ORACLE_DATAPUMP', line 52

    Can you see what I'm doing wrong?

    Any help is greatly appreciated!
    Thank you.

    user9969845 wrote:
    ... Etc...

    TYPE ORACLE_DATAPUMP
    THE DEFAULT DIRECTORY MESSAGE_ARCHIVE_DIR
    LOCATION ('sys_indexes.dmp', 'sys_tables.dmp')

    Combination dump files

    Files dump populated by different external tables can all be specified in the LOCATION of another external table clause. For example, data from different databases can be unloaded in separate files, and these files can then be included in an external table defined in a data warehouse. This provides an easy way to aggregate data from multiple sources. The only restriction is that the metadata for all external tables is exactly the same. This means that the game characters, time zone, schema name, table name, and column names must match. In addition, the columns must be defined in the same order, and their data types must be identical. This means that after you create the first external table you must remove it so that you can use the same table name for the second outer table. This ensures that the metadata in two dump files is the same and they can be used together to create the external table even.
    8 2

  • Remove using external table data

    Hello

    Please could someone help me with the instruction to delete an entire row of referencing a person_id on an internal table where it corresponds to the id of the person on an external? I have the statement of updated date below, but also need to know how to remove (for the entire line, not just one column).

    Update XX_SQL_LOADER_TEST SLT
    Set emp_number = (SELECT emp_number from XX_EXTERNAL_TBL WHERE AND.) Person_id = HI. PERSON_id)
    , emp_name = (SELECT XX_EXTERNAL_TBL emp_name AND where AND.) Person_id = HI. PERSON_id)


    Thank you very much

    Steve

    Published by: SteveCPP on January 17, 2011 13:19

    Hello

    Here's one way:

    DELETE     xx_sql_loader_test
    WHERE     person_id     IN (
                        SELECT  person_id
                        FROM     xx_external_tbl
                      )
    ;
    

    It does not matter if xx_external_tbl is an external table.

  • Facing many problems on the creation of directory and an external Table

    Question:

    The strange thing is that if you look at the question 10-b page 3-41, it says:
    (page 3-41 "Oracle Database 10g SQL Fund. II Vol.1")

    Merge the data into the EMP_DATA table that is created in the lab last in the data in the table emp_hist. assume
    EMP_DATA external table data corresponds to the EMP_HIST of table, update the email column
    table EMP_HIST to match the row in the EMP_DATA table. If a row in the EMP_DATA table is not
    match, to be inserted in the tables of EMP_HIST lines are considered as corresponding whenever his first and
    family name are the same.

    For me, this issue is built wrong. First of all in the last lab we have not been asked to create EMP_DATA. Secondly, EMP_DATA is empty.
    Thirdly, this question asks us to merge into the table EMP_HIST while EMP_DATA is empty.

    Table EMP_HIST currently copied data from the employees table. Structure EMP_HIST:

    FIRST NAME VARCHAR2 (20)
    LAST_NAME NOT NULL VARCHAR2 (25)
    EMAIL NOT NULL VARCHAR2 (45)

    Anway, I did the merger as follows:

    merge into e emp_hist
    with the help of emp_data d
    on (e.first_name = d.first_name)
    When matched then
    game update
    Select = d.last_name,
    e.email = d.email
    When not matched then
    Insert values (d.first_name, d.last_name, d.email);

    I get this error:

    Error report:
    SQL error: ORA-29913: error in executing ODCIEXTTABLEOPEN legend
    ORA-29400: data cartridge error
    KUP-04040: file emp.dat in EMP_DIR not found
    ORA-06512: at "SYS." ORACLE_LOADER', line 19
    29913 00000 - "error in the execution of %s legend".
    * Cause: The execution of the specified legend caused an error.
    * Action: Examine the error messages take appropriate measures.

    On the other hand, I said I'm going to try this:

    merge into emp_data d
    using e emp_hist
    on (d.first_name = e.first_name)
    When matched then
    game update
    d.last_name = select,
    d.email = e.email
    When not matched then
    Insert values (e.first_name, select, e.email);

    I get this error because the external table is final once its creation is as far as I know:

    Error report:
    SQL error: ORA-30657: operation not supported on external organized table
    30657.0000 - "operation not supported on external-organized table".
    * Cause: User attempted on the operation on an external table which is
    not supported.
    * Action: Don't do that!

    **********************************

    I don't know what to do. I did my best, please help.

    Published by: user11164565 on July 27, 2009 02:43

    user11164565 wrote:
    NOTE: I did my best, I've done everything I can do, but the problem persists. Help, please

    I'll mention all the steps that I made it clear...

    I gave scott the following grants:

    grant create any directory Scott;
    grant read on the directory emp_dir to scott;

    -----------------------

    1. create a directory and its been created successfully:

    create or replace directory emp_dir
    like 'F:\emp_dir ';

    Then I made just to make sure that my directory is recognized the following:

    SELECT *.
    OF dba_directories;

    I found the drive among the results...

    OWNER NOM_REPERTOIRE
    ------------------------------ ------------------------------
    DIRECTORY_PATH
    --------------------------------------------------------------------------------
    SYS EMP_DIR
    F:\emp_dir

    SYS SUBDIR
    D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\/2002/Sep

    SYS XMLDIR
    D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\

    ----------------------
    2. I created an external table emp_data (the script is given by the text book): successfully done

    drop table emp_data;

    CREATE TABLE emp_data
    (first name VARCHAR2 (20))
    , last_name VARCHAR2 (20)
    , email VARCHAR2 (30)
    )
    EXTERNAL ORGANIZATION
    (
    TYPE oracle_loader
    Emp_dir default DIRECTORY
    ACCESS SETTINGS
    (
    RECORDS DELIMITED BY NEWLINE CHARACTERSET US7ASCII
    NOBADFILE
    NOLOGFILE
    FIELDS
    (first name POSITION (01:20) TANK)


    , last_name POSITION (22:41) TANK
    CHAR POSITION (43:72) by email)
    )
    LOCATION ('emp.dat'));

    --------------------------------

    3. I went to drive F:\ to see if emp_dir file exist or not! I did not see it. I checked the files hidden, nothing. Anyway, I ignored and did step 4.

    "Anyway, I ignored him... "

    and so the rest of your problems. I do not see in the steps you told that acually you created a directory ("folder") named "\emp_dir" on your f: drive. Anything that you create the database will actually create this directory on the operating system. Uttering a directory in Oracle, uttering an external table in Oracle, don't create pointers to Oracle objects will assume just actually exists.

  • How to select the csv data stored in a BLOB column as if it were an external table?

    Hi all

    (Happy to be back after a while! )

    Currently I am working on a site where users should be able to load the data of csv (comma is the separator) of their client machines (APEX 3.2 application) in the Oracle 11.2.0.4.0 EE database.

    My problem is:

    I can't use an external table (for the first time in my life ) so I'm a little clueless what to do as the csv data is stored by the application of the APEX in a BLOB column, and I'm looking for an elegant way (at least SQL PL/SQL/maximization) to insert the data into the destination table (run validations by a MERGER would be the most effective way to do the job).

    I found a few examples, but I think they are too heavy and there could be a more elegant way in Oracle DB 11.2.

    Simple unit test:

    drop table CBC purge;

    drop table dst serving;

    create table src

    (myblob blob

    );

    create table dst

    (num number

    , varchar2 (6) str

    );

    Insert in src

    Select utl_raw.cast_to_raw (1; AAAAAA ;'|| Chr (10) |

    2; BATH; »

    )

    Double;

    Desired (of course) output based on the data in table SRC:

    SQL > select * DST;

    NUM STR

    ---------- ------

    1 ABDELKRIM

    2 BATH

    Does anybody know a solution for this?

    Any ideas/pointers/links/examples are welcome!

    / * WARNING: I was 'off' for about 3 months, then the Oracle - the part of my brain has become a bit "rusty and I feel it should not be so complicated as the examples I've found sofar ' * /"

    Haha, wonder about regexp is like the blind leading the blind!

    However, it's my mistake: I forgot to put the starting position setting (so 1, 2, 3,... was in fact the starting position, not the nth occurrence. duh!)

    So, it should actually be:

    select x.*
    ,      regexp_substr(x.col1, '[^;]+', 1, 1)
    ,      regexp_substr(x.col1, '[^;]+', 1, 2)
    ,      regexp_substr(x.col1, '[^;]+', 1, 3)
    ,      regexp_substr(x.col1, '[^;]+', 1, 4)
    ,      regexp_substr(x.col1, '[^;]+', 1, 5)
    ,      regexp_substr(x.col1, '[^;]+', 1, 6)
    from  src
    ,      xmltable('/a/b'
                  passing xmltype(''||replace(conv_to_clob(src.myblob), chr(10), '')||'')
                  columns
                    col1 varchar2(100) path '.') x;
    

    Note: that's assuming that all the "columns" passed in the string won't be lame.

    If one of them might be null, then:

    select x.*
    ,      regexp_substr(ltrim(x.col1, ';'), '[^;]+', 1, 1)
    ,      regexp_substr(ltrim(x.col1, ';'), '[^;]+', 1, 2)
    ,      regexp_substr(ltrim(x.col1, ';'), '[^;]+', 1, 3)
    ,      regexp_substr(ltrim(x.col1, ';'), '[^;]+', 1, 4)
    ,      regexp_substr(ltrim(x.col1, ';'), '[^;]+', 1, 5)
    ,      regexp_substr(ltrim(x.col1, ';'), '[^;]+', 1, 6)
    from   src
    ,      xmltable('/a/b'
                  passing xmltype(replace(';'||replace(conv_to_clob(src.myblob), chr(10), ';')||'', ';;', '; ;'))
                  columns
                    col1 varchar2(100) path '.') x;
    
  • External table is created without data

    Hey, guys:

    Please help me on this problem: I tried to load some data from a bunch of csv on linux server files external tables. However, the table is created without data. There is no warning message. but I check the CSV with cat, there are data. This is the query.
    create table worcs.ACBRD_0050_EXT(
    CODE VARCHAR2(4),
    POL_NBR VARCHAR2(8),
    CENT VARCHAR2(2),
    YR VARCHAR2(2),
    SEQ VARCHAR2(1),
    CLAIM_NBR VARCHAR2(4),
    SORT_INIT VARCHAR2(2),
    SORT_SEQ VARCHAR2(2),
    ENTER_CC_50 VARCHAR2(2),
    ENTER_YY_50 VARCHAR2(2),
    ENTER_MM_50 VARCHAR2(2),
    ENTER_DD_50 VARCHAR2(2),
    PREM_DUE_50 NUMBER(11,2),
    POL_STS_50 VARCHAR2(1),
    POL_AUDT_TYPE_50 VARCHAR2(1),
    CHANGE_50 VARCHAR2(1),
    REV_AUD_DED_50 VARCHAR2(1),
    AUDIT_ID_50 VARCHAR2(8),
    BILL_CC_50 VARCHAR2(2),
    BILL_YY_50 VARCHAR2(2),
    BILL_MM_50 VARCHAR2(2),
    BILL_DD_50 VARCHAR2(2)
    )
    organization external ( 
    default directory ksds
    access parameters
     ( records delimited by newline 
      badfile xtern_log_dir: 'xtern_acbrd_0050.bad'
     logfile xtern_log_dir:'xtern_acbrd_0050.log'
      discardfile xtern_log_dir:'xtern_acbrd_0050.dsc'
      ) location ('acbrd-0050.csv') ) REJECT LIMIT unlimited 
    ;
    And Linux, it says:
    [oracle@VM-OracleBI ksds]$ cat acbrd-0050.csv
    0050|00508081|1|11|1|    |  |  |1|11|10|31| 000001638.00|L|C|Y|A|CONF    | |  |  |  |
    0050|01803167|1|10|1|    |  |  |1|11|10|27| 000000896.00|L|C|Y|A|CONF    | |  |  |  |
    [oracle@VM-OracleBI ksds]$

    Transform your table create as

    POL_NBR VARCHAR2 (8).
    HUNDRED VARCHAR2 (8).
    YEAR VARCHAR2 (2),
    SEQ VARCHAR2 (2),
    CLAIM_NBR VARCHAR2 (4).
    SORT_INIT VARCHAR2 (2),
    SORT_SEQ VARCHAR2 (2),
    IND_0115 VARCHAR2 (2),
    CODE VARCHAR2 (4)

    then you will get it. If you looked in your LOG file as I mentioned earlier, you would have found a cargo of ORA-12899: value too large for column errors.

  • Download data from an external table with a where clause clause

    Hello

    How can I insert data in an external table into a table already created in the database where person_id = person - _id on the external table?

    Example:

    External table
    XX_EXTERNAL_TBL (Person_id, emp_number, emp_name)
    Internal table
    XX_SQL_LOADER_TEST (Person_id, emp_number, emp_name)
    ID of the person already exists on the inner table (want only the last column to import where the ID of the person are the same)


    Thank you

    You talk of * 'Update' * (Fanfarrias y tambores)

    Update XX_SQL_LOADER_TEST SLT
    Set emp_number = (SELECT emp_number from XX_EXTERNAL_TBL WHERE AND.) Person_id = HI. PERSON_id)
    , emp_name = (SELECT XX_EXTERNAL_TBL emp_name AND where AND.) Person_id = HI. PERSON_id)

  • Doubt of external Table

    Hi Master,

    Using Sql * Loader I can load the dat/csv/txt data to oracle tables. I can use it when clause contained in the data file and load control in different tables.

    e.g. when deptno = 20 then table 1. Where deptno = 10 then table2 etc...

    But using the external table... How can I load data in different tables as an example above? I googled. but do not get appropriate information. Please advise... !!

    Concerning

    AR

    Bad code. You use positional WHEN when you define variable length fields. As a result, your code will load Department 201, 2090,...:

    SQL > create table T_DEPTNO_20)

    NUMBER 2 DEPTNO,

    3 DNAME VARCHAR2 (14).

    LOC 4 VARCHAR2 (13)

    5)

    6 EXTERNAL ORGANIZATION

    () 7

    ORACLE_LOADER TYPE 8

    9 DEFAULT TEMP DIRECTORY

    10 ACCESS SETTINGS

    (11)

    12 RECORDS DELIMITED BY NEWLINE

    13 CHARGE WHEN (1:2) = "20"

    14 LOGFILE 'MyFile.log.

    15 BADFILE "MyFile.bad."

    16 NODISCARDFILE

    17 FIELDS TERMINATED BY ', '.

    18 EVENTUALLY FRAMED BY "" "

    RTRIM 19

    20 MISSING FIELD VALUES ARE NULL

    (21)

    22 DEPTNO,

    23 DNAME,

    LOC 24

    25)

    26)

    27 RENTAL ("MyFile.csv")

    28)

    RELEASE 29 UNLIMITED LIMIT

    30.

    Table created.

    SQL > select * from T_DEPTNO_20

    2.

    DEPTNO DNAME LOC

    ---------- -------------- -------------

    SEARCH 20 DALLAS

    201 DO NOT LOAD ARMPIT

    SQL > drop table T_DEPTNO_20

    2.

    Deleted table.

    SQL > create table T_DEPTNO_20)

    NUMBER 2 DEPTNO,

    3 DNAME VARCHAR2 (14).

    LOC 4 VARCHAR2 (13)

    5)

    6 EXTERNAL ORGANIZATION

    () 7

    ORACLE_LOADER TYPE 8

    9 DEFAULT TEMP DIRECTORY

    10 ACCESS SETTINGS

    (11)

    12 RECORDS DELIMITED BY NEWLINE

    13 CHARGER WHEN deptno = '20'

    14 LOGFILE 'MyFile.log.

    15 BADFILE "MyFile.bad."

    16 NODISCARDFILE

    17 FIELDS TERMINATED BY ', '.

    18 EVENTUALLY FRAMED BY "" "

    RTRIM 19

    20 MISSING FIELD VALUES ARE NULL

    (21)

    22 DEPTNO,

    23 DNAME,

    LOC 24

    25)

    26)

    27 RENTAL ("MyFile.csv")

    28)

    RELEASE 29 UNLIMITED LIMIT

    30.

    Table created.

    SQL > select * from T_DEPTNO_20

    2.

    DEPTNO DNAME LOC

    ---------- -------------- -------------

    SEARCH 20 DALLAS

    SQL >

    SY.

  • external table

    Hello

    I try to get data by using the external table as follows

     create table nfs_acq
     (
      Participant_ID                            char( 3         ),
      Transaction_Type                          char( 2         ),
      From_Account_Type                         char( 2         ),
      To_Account_Type                           char( 2         ),
      Trans_srno                                char( 12        ),
      Response_Code                             char( 2         ),
      PAN_Number                                char( 19        ),
      Member_Number                             char( 1         ),
      Approval_Number                           char( 6         ),
      System_Trace_Number                char( 12       ),
      Transaction_Date                           char( 6        ),
      Transaction_Time                           char( 6        ),
      Merchant_Category_Code                     char( 4        ),
      Card_Acceptor_S_Date                       char( 6        ),
      Card_Acceptor_ID                           char( 15       ),
      Card_Acceptor_t_ID                         char( 8        ),
      Card_Acceptor_t_Location           char( 40       ),
      Acquirer_ID                                char( 11       ),
      Acquirer_Settlement_Date                   char( 6        ),
      Transaction_Currency_code                  char( 3        ),
      Transaction_Amount                         char( 15       ),
      Actual_Transaction_Amount                  char( 15       ),
      Transaction_Acitivity_fee                  char( 15       ),
      Acquirer_Cur_Code                         char( 3         ),
      Acquirer_s_Amount                         char( 15        ),
      Acquirer_Settlement_Fee                    char( 15       ),
      Acquirer_settl_proc_fee                   char( 15        ),
      Tran_Acq_Conv_Rate                        char( 15        )
     )
     --
            ORGANIZATION EXTERNAL
             ( TYPE ORACLE_LOADER
               DEFAULT DIRECTORY HRK_NEW
               ACCESS PARAMETERS
               ( RECORDS fixed 274
           skip 1
             FIELDS (
     --
      Participant_ID                            char( 3         ),
      Transaction_Type                          char( 2         ),
      From_Account_Type                         char( 2         ),
      To_Account_Type                           char( 2         ),
      Trans_srno                                char( 12        ),
      Response_Code                             char( 2         ),
      PAN_Number                                char( 19        ),
      Member_Number                             char( 1         ),
      Approval_Number                           char( 6         ),
      System_Trace_Number                       char( 12       ),
      Transaction_Date                           char( 6        ),
      Transaction_Time                           char( 6        ),
      Merchant_Category_Code                     char( 4        ),
      Card_Acceptor_S_Date                       char( 6        ),
      Card_Acceptor_ID                           char( 15       ),
      Card_Acceptor_t_ID                         char( 8        ),
      Card_Acceptor_t_Location                   char( 40       ),
      Acquirer_ID                                char( 11       ),
      Acquirer_Settlement_Date                   char( 6        ),
      Transaction_Currency_code                  char( 3        ),
      Transaction_Amount                         char( 15       ),
      Actual_Transaction_Amount                  char( 15       ),
      Transaction_Acitivity_fee                  char( 15       ),
      Acquirer_Cur_Code                         char( 3         ),
      Acquirer_s_Amount                         char( 15        ),
      Acquirer_Settlement_Fee                    char( 15       ),
      Acquirer_settl_proc_fee                   char( 15        ),
      Tran_Acq_Conv_Rate                        char( 15        )
     )
                       )
                                 LOCATION ('
           ACQRPKJB110116.mkjb')
          )
     reject limit unlimited
    /
    

    table design

    However

    When I select data from table, I get below error

    ORA-29913: error in executing ODCIEXTTABLEOPEN legend

    ORA-29400: data cartridge error

    KUP-00554: error occurred when parsing the access settings

    KUP-01005: syntax error: found 'minussign': expected an a: 'double-quoted-string, identifier, single-quoted-string '.

    KUP-01007: in column 2 line 4

    29913 00000 - "error in the execution of %s legend".

    * Cause: The execution of the specified legend caused an error.

    * Action: Examine the error messages take appropriate measures.

    This is a sequential I am trying to import

    KJB0403 4643470817234643471601110731336011160111ATM00201 001107001303004213191476009651 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000070000000000000070000000000000000000356000000000070000000000000000000000000000000000000001000000000 CHOWK

    KJB0503 0174520817337281611601110956246011160111ATM00201 001109001320004293932011713114 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000000000000000000000000000000000000000356000000000000000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 0176940817339062491601110957576011160111ATM00201 001109001321004293932011713114 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000050000000000000050000000000000000000356000000000050000000000000000000000000000000000000001000000000 CHOWK

    KJB0402 8653240817340573261601110959156011160111ATM00201 001109001322004722554560104882 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000320000000000000320000000000000000000356000000000320000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 4459000817360340861601111015066011160111ATM00201 001110001326005044372611412016 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000001000000000000001000000000000000000000356000000001000000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 6468820817392369431601111037426011160111ATM00201 001110001335004214090575031872 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000100000000000000100000000000000000000356000000000100000000000000000000000000000000000000001000000000 CHOWK

    KJB0402 9133280817459788951601111119146011160111ATM00201 001111001359006074194560106006 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000600000000000000600000000000000000000356000000000600000000000000000000000000000000000000001000000000 CHOWK

    KJB0402 1985030817481985031601111131596011160111ATM00201 001111001362005360160500127597 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000001000000000000001000000000000000000000356000000001000000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 4400820817484400821601111133216011160111ATM00201 001111001363004213371215519505 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000200000000000000200000000000000000000356000000000200000000000000000000000000000000000000001000000000 CHOWK

    KJB0402 0817491361901601111137166011160111ATM00201 001111001366044135083790012559 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000300000000000000000000000000000000000356000000000000000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 6891010817496562841601111140096011160111ATM00201 001111001368004214090322036455 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000050000000000000050000000000000000000356000000000050000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 1310430817509973121601111147346011160111ATM00201 001111001371004689680028170636 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000001000000000000001000000000000000000000356000000001000000000000000000000000000000000000000001000000000 CHOWK

    KJB0503 0309320817544106971601111206046011160111ATM00201 001112001375005296160001593353 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000000000000000000000000000000000000000356000000000000000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 0322130817546216041601111207116011160111ATM00201 001112001376005296160001593353 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000700000000000000700000000000000000000356000000000700000000000000000000000000000000000000001000000000 CHOWK

    KJB0502 8851180817548851181601111208376011160111ATM00201 001112001377005087530341448208 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000000000000000000000000000000000000000356000000000000000000000000000000000000000000000000001000000000 CHOWK

    KJB0402 0566530817550566531601111209336011160111ATM00201 001112001378005087530341448208 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000420000000000000420000000000000000000356000000000420000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 6943770817556943771601111213006011160111ATM00201 001112001379004214920342912709 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000050000000000000050000000000000000000356000000000050000000000000000000000000000000000000001000000000 CHOWK

    KJB0402 7864780817559532151601111214256011160111ATM00201 001112001380006220180039900075266 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000330000000000000330000000000000000000356000000000330000000000000000000000000000000000000001000000000 CHOWK

    KJB0402 1083880817581341641601111226086011160111ATM00201 001112001382004378990101766440 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000800000000000000800000000000000000000356000000000800000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 4830820817582764451601111226546011160111ATM00201 001112001383006071600100041514 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000700000000000000700000000000000000000356000000000700000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 6286600817597510771601111234376011160111ATM00201 001112001386005326760302103432 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000100000000000000100000000000000000000356000000000100000000000000000000000000000000000000001000000000 CHOWK

    KJB0402 0029180817604353121601111238126011160111ATM00201 001112001389004704560203009224 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000001000000000000001000000000000000000000356000000001000000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 3000000817608080441601111240116011160111ATM00201 001112001390005044339052564987192 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000400000000000000400000000000000000000356000000000400000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 0139290817626145271601111249456011160111ATM00201 001112001396005346800000069646 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000900000000000000900000000000000000000356000000000900000000000000000000000000000000000000001000000000 CHOWK

    KJB0403 1126320817671162161601111313226011160111ATM00201 001113001406005196190081887558 ATM00201TILAK KALYAN THANE MHIN800044 160111356000000000020000000000000020000000000000000000356000000000020000000000000000000000000000000000000001000000000 CHOWK

    Help, please

    External table reference...

    Comments are lines that start with two dashes followed text. Comments must be placed before all access settings, for example:

    access_parameters Clause

    
    The access parameters clause contains comments, record formatting, and field formatting information. The syntax for the access_parameters clause is as follows:
    
    Text description of the illustration et_access_parameter.gif
    
    
    
    

    Comments

    
    Comments are lines that begin with two dashes followed by text. Comments must be placed before any access parameters, for example:
    
    
    --This is a comment
    --This is another comment
    RECORDS DELIMITED BY NEWLINE
    
    
     
    
  • The external Table storage

    Since data is stored outdoors, and the definition that is stored inside, it means that a the table structure of the outer table is stored in the database as well (or a virtual table based on the definition of the external table...)

    I'll hit the ORA-DOCS again once, back in the external tables read tonight on them 2 or 3 sources and it is not quite clear whether real data with structure exists outside the database or an internal table set (and stored) retrieves data from an outside source.

    Since data is stored outdoors, and the definition that is stored inside, it means that a the table structure of the outer table is stored in the database as well (or a virtual table based on the definition of the external table...)

    The 'definition' you refer to IS the structure of the table; they are one and the same. There is no 'table' stored in the database using space or storage. When a query on an external table is executed, the data source is read.

    
    I'll be hitting the ORA-DOCS up again, just got back into external tables tonight reading up on them from 2-3 sources and it is not quite clear if an actual data with structure exists out of the database , or an internally defined (and stored?) table draws data from an outside source.
    

    I suggest you that start with the documentation of Oracle - including the ground provided the link to:

    If any "metadata" are stored outside the database depends on if the file that is outside of the database was produced by Oracle using the robot UNLOADING discussed in this doc

    Unloading of data using ORACLE_DATAPUMP Access driver

    To unload data, you use the ORACLE_DATAPUMP driver access. The stream that is discharged is in a proprietary format and contains all of the data column for each row being unloaded.

    A discharge operation also creates a stream of metadata that describes the content of the data stream. The information in the metadata stream are required to load the stream. Therefore, the metadata stream is written to the file data and placed before the data stream.

    If YOU provide data/files, then you MUST provide it in the format expected by the external table statement. You can, if you wish, use a preprocessor to convert ANY file (zip, encrypted, etc.) in the required format.

    For YOUR files, you can the metadata stored in the same file, or elsewhere, if you choose, but Oracle will have NO knowledge of this fact and not will NOT be involved in the transformation or read any of the metadata that you provide. Your preprocessor must remove all these metadata and ONLY provide data in the format appropriate for Oracle to use.

    If the file was produced by the process of UNLOADING Oracle then it will include metadata that Oracle WILL read, use, and remove as says this quote from doc above. These external metadata is added to the real external table definintion/metadata stored in the dictionary.

  • ORA-29913 for external table on Windows 7

    Hello

    Please help with the following problem.

    I installed Oracle 11 g on Windows 7 Pro workstation and have created an external table.

    I'm getting an ORA-29913 when I select.

    What I did is given below.

    create the directory imp_files as 'C:\app\user\admin\orcl\dpdump\'-'C:\orcl_work '.
    ;

    drop table people
    ;
    create table people)
    first name varchar2 (250).
    VARCHAR2 (250) last_name,.
    hire_date date,
    number of salary
    )
    (external) Organization
    type oracle_loader
    the default directory data_pump_dir
    (settings) access
    records delimited by newline
    BadFile data_pump_dir: 'pers1%a_%p.bad' /*'pers.bad'*/
    data_pump_dir log file: "pers1%a_%p.log" /*'pers.log'*/
    fields termintated by ' |'
    missing field values are null
    (first_name, last_name, hire_date 'dd.mm.yyyy' format mask, salary)
    )
    location ("pers_table1.txt")
    )
    reject limit unlimited
    ;

    Hello

    you completed wrongly spelt...

    Try to fix that and try again.

    See you soon,.

    rich

  • error when reading flat file of external table... "ORA-01849: time must be between 1 and 12"

    My question is - is it possible for me to fix this error at the level of external table definition? Please advice

    Here is the data file I am trying to download...

    KSEA | 08-10 - 2015-17.00.00 | 83.000000 | 32.000000 | 5.800000

    KBFI | 2015-08-06 - 15.00.00 | 78.000000 | 35.000000 | 0.000000

    KSEA | 08-10 - 2015-11.00.00 | 73.000000 | 55.000000 | 5.800000

    KSEA | 08-08 - 2015-05.00.00 | 61.000000 | 90.000000 | 5.800000

    KBFI | 2015-08-06 - 16.00.00 | 78.000000 | 36.000000 | 5.800000

    KSEA | 2015-08-07 - 18.00.00 | 82.000000 | 31.000000 | 10.400000

    KSEA | 08-10 - 2015-00.00.00 | 65.000000 | 61.000000 | 4.600000

    KBFI | 08-08 - 2015-07.00.00 | 63.000000 | 84.000000 | 4.600000

    KSEA | 08-10 - 2015-15.00.00 | 81.000000 | 34.000000 | 8.100000

    This is the external table script

    CREATE TABLE MWATCH. MWATCH. WEATHER_EXT ".

    (

    LOCATION_SAN VARCHAR2 (120 BYTE),

    DATE OF WEATHER_DATETIME,

    NUMBER (16) TEMP.

    NUMBER (16) OF MOISTURE,

    WIND_SPEED NUMBER (16)

    )

    EXTERNAL ORGANIZATION

    (TYPE ORACLE_LOADER

    THE DEFAULT DIRECTORY METERWATCH

    ACCESS SETTINGS

    (records delimited by newline

    BadFile "METERWATCH": "weather_bad" logfile 'METERWATCH': 'weather_log '.

    fields ended by ' |' missing field values are null

    (location_san, WEATHER_DATETIME char date_format DATE mask "YYYY-mm-dd - hh.mi.ss", TEMPERATURE, MOISTURE, wind_speed)

    )

    LOCATION (METERWATCH: 'weather.dat')

    )

    REJECT LIMIT UNLIMITED

    PARALLEL (DEGREE 5 1 INSTANCES)

    NOMONITORING;

    Here is the error in the weather_bad which is generated files...

    column WEATHER_DATETIME of 55 error processing in the 1st row to the /export/home/camsdocd/meterwatch/weather.dat data file
    ORA - 01849ther_log.log 55 56 error processing column WEATHER_DATETIME in the row 1 for the /export/home/camsdocd/meterwatch/weather.dat data file
    5756 ORA - 01849ther_log.log: time must be between 1 and 12
    58column WEATHER_DATETIME 57 error during treatment number 2 for the /export/home/camsdocd/meterwatch/weather.dat data file
    59ORA-58 01849: time must be between 1 and 12
    60column WEATHER_DATETIME of 59 error processing 5th for the /export/home/camsdocd/meterwatch/weather.dat data file
    61ORA-60 01849: time must be between 1 and 12
    62column WEATHER_DATETIME of 61 error treatment in line 6 to the /export/home/camsdocd/meterwatch/weather.dat data file
    63ORA-62 01849: time must be between 1 and 12
    64column WEATHER_DATETIME of 63 error treatment in row 7 for datafile /export/home/camsdocd/meterwatch/weather.dat
    65ORA-64 01849: time must be between 1 and 12
    66column WEATHER_DATETIME of 65 error treatment 9 for the /export/home/camsdocd/meterwatch/weather.dat data file online
    67: time must be between 1 and 12

    My question is - is it possible for me to fix this error at the level of external table definition? Please advice

    Yes it is possible.  Let's not your date mask.  You're masking for 12-hour format when your data is in 24-hour format.  Change the mask of your date to be "YYYY-mm-dd-hh24. MI.ss ".  Notice the change in "BOLD".

  • create an external table based on local drive

    Hello world

    Is it possible to create an external table and that it points to a file on my local drive?

    It is perhaps a silly question. I'm sorry.

    Thank you

    Lydiea

    In addition to the response of William Robertson (which is correct), if you do not have a way to make the server access to your local disk, you can use sql loader on your local computer to load the data into an actual table.

  • Load the XML file into Oracle external Table


    I load the data from the XML file into an intermediate table Oracle using external Tables.

    Let's say below, it is my XML file

    < header >
    < A_CNT > 10 < / A_CNT >
    < E_CNT > 10 < / E_CNT >
    < AF_CNT > 10 < / AF_CNT >
    < / header >
    < student >
    <>students-details
    < Student_info >
    < Single_Info >
    < ID > 18 / < ID >
    New York < City > < / City >
    < country > United States < / country >
    < Name_lst >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >
    Aware of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < Student_name >
    Samuel < name > < / name >
    Paul < Last_name > < / Last_name >
    < DOB > 19871208 < / DOB >

    < TerminationDt > 20050812 < / TerminationDt >
    History of < RecordStatus > < / RecordStatus >
    < / Student_name >
    < / Name_lst >
    < Personal_Info >
    <>men < / Type >
    < 27 > < / Age >
    < / Personal_Info >
    < / Single_Info >
    < / Student_info >

    < student - register >
    class < A >
    < info >
    < detail >
    < ID student > 18 < / student >
    EE < major > < / Major >
    < course-Grades >
    < course > VLSI < / course >
    < degree > 3.0 < / Grade >
    < / course-Grades >
    < course-Grades >
    < course > nanotechnology < / course >
    < degree > 4.0 < / Grade >
    < / course-Grades >
    < / details >
    < detail >
    < ID student > 18 < / student >
    THIS < major > < / Major >
    < / details >
    < / info >
    class < A >
    < Student_Enrol >
    <>students-details
    < student >

    I load this XML data file into a single table using an external Table. Could someone help me please with coding.

    Thank you

    Reva

    Could you please help me how to insert my XML content into that.

    Same as before, try a plain old INSERT:

    insert into xml_pecos

    values)

    XmlType (bfilename ('XML_DIR', "test.xml"), nls_charset_id ('AL32UTF8'))

    );

    But you'll probably hit the same limitation as with the binary XMLType table.

    In this case, you can use FTP to load the file as a resource in the XML DB repository.

    If the XML schema has been registered with the hierarchy enabled then the file will be automatically inserted into the table.

    Could you post the exact statement that you used to save the scheme?

    In the meantime, you can also read this article, I did a few years ago, it covers the XML DB features that may be useful here, including details on how to load the file via FTP:

    https://odieweblog.WordPress.com/2011/11/23/Oracle-XML-DB-a-practical-example/

    And documentation of the course: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb06stt.htm#ADXDB4672

Maybe you are looking for