External table wont display

db=xe
Hello,
I am attempting to create an external table to reference a csv file that contains exif data from images. The exif data presents the date in the following form 2011:12:03 16:47:27
I have constructed the external table like this;
CREATE TABLE metadata_external
( sourcefile VARCHAR2 (255 CHAR)
, createdate VARCHAR2 (255 CHAR)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
  DEFAULT DIRECTORY "UPLOAD_DIR"
  ACCESS PARAMETERS
    ( RECORDS DELIMITED BY NEWLINE
      NOBADFILE
      NOLOGFILE
      FIELDS TERMINATED BY ','
      MISSING FIELD VALUES ARE NULL
      ( sourcefile
      , createdate
  LOCATION
    ( "UPLOAD_DIR":'metadata_external.csv'
) REJECT LIMIT UNLIMITED;You will note that I have given the createdate column a datatype of varchar2. This was to avoid any problems with formating so that I could use the to_date function when inserting into other tables.
But the following code will not display anything but throws the following error;
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: "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 8 column 1
ORA-06512: at "SYS.ORACLE_LOADER", line 19I suspect that the : separators in the date are causing the problems.
Would anyone have some suggestions to fix this problem?
Thank You
Ben

Hello Mahir,
Here is the csv contents;
SourceFile,CreateDate,DOF,ShutterSpeed,Aperture,ISO,MeteringMode,ExposureCompensation,FileName,LightValue
C:/temp/_DSC6473.NEF,2011:12:03 16:47:27,3.38 m (5.04 - 8.42),1/1600,5.0,100,Multi-segment,-1,_DSC6473.NEF,15.3
C:/temp/_DSC6474.NEF,2011:12:03 16:47:53,3.38 m (5.04 - 8.42),1/2000,5.0,100,Multi-segment,-1,_DSC6474.NEF,15.6
C:/temp/_DSC6475.NEF,2011:12:03 16:48:22,3.38 m (5.04 - 8.42),1/800,5.0,100,Multi-segment,-1,_DSC6475.NEF,14.3
C:/temp/_DSC6476.NEF,2011:12:03 16:48:32,3.38 m (5.04 - 8.42),1/1250,5.0,100,Multi-segment,-1,_DSC6476.NEF,14.9
C:/temp/_DSC6477.NEF,2011:12:03 16:48:57,3.38 m (5.04 - 8.42),1/500,5.0,100,Multi-segment,-1,_DSC6477.NEF,13.6Please note I have only referenced the first two columns in the ddl for the external table because the second column is continueing to return errors.
Thank You
Ben
Edited by: benton on Dec 9, 2011 7:36 AM

Similar Messages

  • 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

  • Report query not returning the field value from external table

    hi
    I have an issue regarding reports. I have a query having 4 fields from external table and remaining from db tables. the report query returns all the fields from the db tables and only 2 fields from external table. but the same query if I tried in plsql developer it returns all the fields values.
    Can anyone please help me in this issue.
    Thanks and Regards
    kk

    Duplicate post?
    value not displaying in report whereas it returns in plsql developer
    value not displaying in report whereas it returns in plsql developer
    Please log a SR if you do not get any reply to your thread instead of creating new one.
    Thanks,
    Hussein

  • Issues with external table from excel file

    dear all,
    i have been trying to use the below statement to create an external table.this table is referencing an excel file.
    CREATE TABLE EMPFRAUD_TEST
    SERIAL_NUM VARCHAR2(10 BYTE),
    BRANCH_CODE VARCHAR2(10 BYTE),
    BUSINESS_ADD VARCHAR2(100 BYTE),
    REGIONS VARCHAR2(50 BYTE),
    TRANSACTION_DATE_TIME DATE,
    REPORT_DATE_TIME DATE,
    NO_OF_TRANS VARCHAR2(4 BYTE),
    AMOUNT NUMBER,
    FRAUD_TYPE VARCHAR2(25 BYTE),
    IMPACT_CATEGORY VARCHAR2(10 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY EXT_EMP_TEST
    ACCESS PARAMETERS
    ( records delimited by newline
    badfile 'empfraud%a.bad'
    logfile 'empfraud%a.log'
    fields terminated by ','
    optionally enclosed by '"'lrtrim
    missing field values are null
    LOCATION ('fraud.csv')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;
    the problems is as follows
    1) when i run the query above the table will be created,
    but when i try to select from the table,an empty table will be display.
    when i checked the error log file,the following message was given.
    it was gotten from an oracle db on unix server.
    "L_NUM
    KUP-04036: second enclosing delimiter not found
    KUP-04101: record 71 rejected in file /home/oracle/ext_folder_test/fraud.csv
    KUP-04021: field formatting error for field ACCOUNT_KEY
    KUP-04036: second enclosing delimiter not found
    KUP-04101: record 79 rejected in file /home/oracle/ext_folder_test/fraud.csv
    KUP-04021: field formatting error for field SERIAL_NUM
    KUP-04036: second enclosing delimiter not found
    KUP-04101: record 80 rejected in file /home/oracle/ext_folder_test/fraud.csv
    error processing column TRANSACTION_DATE_TIME in row 1 for datafile /home/oracle/ext_folder_test/fraud.csv
    ORA-01858: a non-numeric character was found where a numeric was expected
    error processing column TRANSACTION_DATE_TIME in row 2 for datafile /home/oracle/ext_folder_test/fraud.csv
    ORA-01843: not a valid month
    error processing column TRANSACTION_DATE_TIME in row 3 for datafile /home/oracle/ext_folder_test/fraud.csv
    ORA-01843: not a valid month
    error processing column TRANSACTION_DATE_TIME in row 8 for datafile /home/oracle/ext_folder_test/fraud.csv
    ORA-01843: not a valid month
    error processing column TRANSACTION_DATE_TIME in row 9 for datafile /home/oracle/ext_folder_test/fraud.csv
    ORA-01843: not a valid month
    error processing column TRANSACTION_DATE_TIME in row 10 for datafile /home/oracle/ext_folder_test/fraud.csv
    ORA-01843: not a valid month
    error processing column TRANSACTION_DATE_TIME in row 11 for datafile /home/oracle/ext_folder_test/fraud.csv
    ORA-01858: a non-numeric character was found where a numeric was expected
    error processing column TRANSACTION_DATE_TIME in row 12 for datafile /home/oracle/ext_folder_test/fraud.csv
    ORA-01843: not a valid month
    error processing column TRANSACTION_DATE_TIME in row 13 for datafile /home/oracle/ext_folder_test/fraud.csv
    ORA-01843: not a valid month
    error processing column TRANSACTION_DATE_TIME in row 14 for datafile /home/oracle/ext_folder_test/fraud.csv
    ORA-01843: not a valid month
    error processing column TRANSACTION_DATE_TIME in row 15 for datafile /home/oracle/ext_folder_test/fraud.csv
    ORA-01843: not a valid month"
    pls i need help to resolve it fast
    thank
    regards
    ajani abdulrahman olayide
    NB:
    after conversion to .csv format,
    BELOW IS THE DATA I AM TRYING TO ACCESS FROM THE EXCEL FILE
    BUSINESS OFFICE,REGIONS,Transaction_Date_Time,Report_Date_Time,Account_Key (Account No),     Number_of_Transactions,Total_Amount (N)      
    1,162,9 ojo street,Lagos South,various ,17/01/10,16200388749987,1,5100000,CHEQUE
    2,0238,"10 cyril Road, Enugu",East,21/06/2006,23/12/10,020968765357 09867653920174,1,20000000
    3,0127,"261, obiageli Rd, Asaba",Mid-West,22/12/2010,23/12/10,'00160030006149,1,6000000
    4,0519,"just road, Onitsha
    ",East,12/03/2010,14/02/11,0896002416575,1,5000000
    5,0519,"just road, Onitsha
    ",East,03/12/2010,14/02/11,06437890134356,1,5000000
    6,149,olayide street,Lagos South,10/02/2010,17/02/11,NGN01492501036 ,1,6108950
    7,0066,wale,Mid - west,18/02/2011,18/02/10,'05590020002924,1,55157977.53
    8,66,john,Mid- west,11/03/2010,14/03/09,'00660680054177,1,6787500
    9,0273,waheed Biem,N/Central,Jan 09 to Dec 2010,01/04/11,Nil,1,14146040

    As others suggested, you have to do the debugging yourself, To avoid the date error you may need something like this:
    CREATE TABLE EMPFRAUD_TEST
        SERIAL_NUM   VARCHAR2(10),
        BRANCH_CODE  VARCHAR2(10),
        BUSINESS_ADD VARCHAR2(100),
        REGIONS      VARCHAR2(50),
        TRANSACTION_DATE_TIME DATE ,
        REPORT_DATE_TIME DATE ,
        NO_OF_TRANS     VARCHAR2(50),
        AMOUNT          NUMBER,
        FRAUD_TYPE      VARCHAR2(25),
        IMPACT_CATEGORY VARCHAR2(10)
      ORGANIZATION EXTERNAL
        type oracle_loader default directory saubhik
        access parameters
        ( records delimited by newline
          badfile 'empfraud%a.bad'
          logfile 'empfraud%a.log'
          skip 1
          fields terminated by ','
          optionally enclosed by '"' ltrim
          missing field values are null
           ( serial_num ,
             branch_code ,
            business_add ,
            regions ,
            transaction_date_time date "dd/mm/rrrr",
            report_date_time date "dd/mm/rr",
            no_of_trans ,
            amount ,
            FRAUD_TYPE ,
            IMPACT_CATEGORY ) ) LOCATION ('fraud.csv')
      REJECT LIMIT UNLIMITED
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • 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

  • Unable to read chinese characters in a flat file to external table

    Hi All,
    We have a flat file containing data in chinese. We are using external table to read data in files. When i do select <coulmn-name> from <table> it displays box for the chinese characters. The column is of type varchar2.
    The NLS_LANGUAGE is AMERICAN and NLS_CHARACTERSET is AL32UTF8.
    The character set is mentioed as UTF8 in external table defnition.
    Is the external table not reading these charcters properly? Should any patch be installed or some settings should be changed for sql developer to to display chinese character?

    The NLS_LANG environment variable/registry string variable (You are just one of the 1000s of 'anonymous' users refusing to post platform and version), so NOT NLS_LANGUAGE, on the server hosting the file, should be set to anything ending in .AL32UTF8
    Sybrand Bakker
    Senior Oracle DBA

  • MBP wont display 1080p on monitor any more

    I have an early 2011 Macbook pro and a hp 2511x monitor. The setup worked flawlessly before I went off to school. Now that Im back home my macbook wont display 1080p on the monitor, only 720p. While attempting to display 1080p the monitor screen is blank but I am able to move my mouse over to the external dispaly just fine, just no picture. My mac will display 1080p on other external monitors & the monitor will work fine with other computers or xbox on 1080p.
    Just upgraded from 10.7 to 10.9 and still not working properly.
    Connecting from mini display to hdmi    
    Thanks!

    Hey adz2k14!
    Here is an article that will help you troubleshoot this issue with your AirPlay functionality:
    iOS: Troubleshooting AirPlay and AirPlay Mirroring
    http://support.apple.com/kb/ts4215
    Take care, and thanks for visiting the Apple Support Communities.
    Cheers,
    Braden

  • Showing Text file as external table without trimming spaces

    Hi all:
    I am trying to display a text file from db sever with original spacing.
    Well it's not entirely related to APEX.
    This is how external table is created:
    create table u_x
      (rowline varchar2(255))
         ORGANIZATION EXTERNAL
           TYPE ORACLE_LOADER
           DEFAULT DIRECTORY ext_tab         <-- this is a dir i have created
           access parameters
           records delimited by newline
           fields notrim
           LOCATION ('aaa.txt')
    REJECT LIMIT UNLIMITED;
    on the first line of the aaa.text (its a report), it shows something like:
    Sat Dec 29                                                                Page 1
    but when I do select * from u_x , the result shows:
    Sat Dec 29 Page 1
    all above is done in sql workshop /sql command in APEX 4.2.1 (db 10.2.0.5)
    Is there any way to preserve the spaces between "29" and "Page"?
    (the result compressed all spaces in-between to 1 space).
    I think the ideal way is to invoke client's notepad to open the server's text file.
    anyway to generate the link?
    Thanks
    John

    Well, I have tried to download the file using below procedure.
    create or replace PROCEDURE download_bfile (
          directory_in   IN   VARCHAR2,
          file_in        IN   VARCHAR2
       AS
          lob_loc    BFILE;
          v_mime     VARCHAR2 (48);
          v_length   NUMBER(16);
       BEGIN
          lob_loc := BFILENAME (UPPER (directory_in), file_in);
          v_length := DBMS_LOB.getlength (lob_loc);
          -- set up HTTP header
          -- use an NVL around the mime type and
          -- if it is a null set it to application/octect
          -- application/octect may launch a download window from windows
          OWA_UTIL.mime_header (nvl(v_mime, 'application/octet'), FALSE);
          -- set the size so the browser knows how much to download
          HTP.p ('Content-length: ' || v_length);
          -- the filename will be used by the browser if the users does a save as
          HTP.p (   'Content-Disposition:attachment; filename="'
                 || SUBSTR (file_in, INSTR (file_in, '/') + 1)
                 || '";'
          -- close the headers
          OWA_UTIL.http_header_close;
          -- download the BLOB
          WPG_DOCLOAD.download_file (lob_loc);
          apex_application.stop_apex_engine;
       END download_bfile;
    I run it inside sql command in apex, but it does not show a pop window to save the file,
    it displays the whole text content of the file in the result window.
    Any idea why the save-as window does not pop up?
    thanks,
    John.

  • External Table Authentication

    Hi I am using OBIEE 11g.
    In my project we have to implement external table authentication. For that we have import the external table to physical layer. and build the repository variable using initialization block. In that i have written a following SQL -
    SELECT loginid
    ,grp
    ,display_name
    ,2
    FROM external_auth
    WHERE loginid = ':USER'
    and password = ':PASSWORD'.
    I have also create the variable target - LOGID, Group, Display Name and Log Level.
    and save the variable.
    My table structure like this - LoginID,Password,Grp, Display Name.
    When i am trying to save the RPD following error message raised.
    ERRORS:
    GLOBAL:
    [38095] The initialization string in the Repository Initialization Block '"Auth Variable"' contains the use of :USER or :PASSWORD.
    Any one to help to come out from this issue.
    Kindly provide any link for step by step guide.
    Thanks
    Gauthaman

    Hi Gautham,
    i think you created Repository Variable.
    Create a Session variable and Session initilization bliock. give the same query in Session Initialize block. it will work.
    Thnaks
    GSR

  • External table -Spanish

    I have an external table as described below.
    One record of the csv has these values:
    104,Referencia de reclamación,ES.
    But when I query the table, TP_DESC, here are the values I get:
    1,Referencia de reclamaci�S, null.
    How do I get it to display the Spanish accent correctly? It looks like the accent is messing up the comma, since 'ES' is not being displayed and looks like it got embedded in reclamaci�S
    Please help.
    CREATE TABLE TP_DESC
    P_ID NUMBER(10, 0)
    , DESC VARCHAR2(100 BYTE)
    , LANG_CD VARCHAR2(2 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY DIR_CONFIG
    ACCESS PARAMETERS
    RECORDS DELIMITED BY '\r\n' SKIP 1
    BADFILE DIR_CONFIG_BAD_FILE:'VS_INITIAL_LOAD_BAD.log'
    logfile dir_config_log_file:'VS_INITIAL_LOAD_LOG.log'
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES ARE NULL
    LOCATION
    DIR_CONFIG: 'TP_DESC.csv'
    REJECT LIMIT UNLIMITED;

    Hi,
    welcome to the forum.
    Please read SQL and PL/SQL FAQ
    When you put some code please enclose it between two lines starting with {noformat}{noformat}
    i.e.:
    {noformat}{noformat}
    SELECT ...
    {noformat}{noformat}
    You can use CHARACTERSET in external table to specify the character set of your datafile.
    i.e.:CREATE TABLE TP_DESC
    P_ID NUMBER(10, 0)
    , DESC VARCHAR2(100 BYTE)
    , LANG_CD VARCHAR2(2 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY DIR_CONFIG
    ACCESS PARAMETERS
    RECORDS DELIMITED BY '\r\n'
    CHARACTERSET WE8MSWIN1252 -- This specifies the character set of datafile
    SKIP 1
    BADFILE DIR_CONFIG_BAD_FILE:'VS_INITIAL_LOAD_BAD.log'
    logfile dir_config_log_file:'VS_INITIAL_LOAD_LOG.log'
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES ARE NULL
    LOCATION
    DIR_CONFIG: 'TP_DESC.csv'
    REJECT LIMIT UNLIMITED;
    {code}
    I have used CHARACTERSET WE8MSWIN1252 but you need to check if this one is the one which is the correct one for you.
    Regards.
    Al

  • 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

  • While loading through External Tables, Japanese characters wrong load

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

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

  • Group Permissions using External Table

    I have a problem with using an external table for user group permissions.
    I am using OBI authentication but need to use an external table to manage the user’s group permissions. I created two RPD groups, GROUP1 and GROUP2. GROUP1 has access to TABLE1. GROUP2 has access to TABLE2. I created the initialization block with the following SQL:
    Select ‘GROUP’, groupname from groups_tab where username = ‘:USER’
    I also turned on row-wise initialization.
    I created a user, USER1, with access to both RPD groups. I also created corresponding Catalog Group (Settings  Administration  Manage Presentation Catalog Groups and Users  Create a new Catalog Group). I have two dashboard pages PAGE1 and PAGE2. GROUP1 has access to PAGE1 and GROUP2 has access to PAGE2. When I log in as USER1, I have a quick test on the My Dashboard page that displays the GROUP session variable (@{biServer.variables[‘NQ_SESSION.GROUP’]}). The variable displays that USER1 belongs to GROUP1; GROUP2. I still cannot see the dashboard pages PAGE1 and PAGE2. When I go to Answers I cannot see TABLE1 or TABLE2.
    Obviously, I must be missing a step somewhere. Any ideas?
    I have tried the Rittman Mead post (http://www.rittmanmead.com/2007/05/21/using-initialization-blocks-with-ldap-and-database-queries-to-control-authentication-and-authorization/) and I am still not getting the right results.
    Edited by: Canz on Feb 25, 2009 4:39 PM

    It's likely to be a permissioning setup issue rather than your Init Block setup which seems to be working. Start by granting your test user full permissions on the object you want and then start removing them gradually to see where you don't see the dashboard any more. I think you might be missing a Traverse privilege in your dashboard shared folders but I can't check all the possible conditions with seeing your web catalog. Also check the case of your Web Catalog groups and the ones you populate on the Init block.

  • How to specify a constant value in external tables??

    Create table cp_portfolio_ext
    rec_type                                                varchar2(1),
    acct_nbr                                                varchar2(23),
    acct_title                                              varchar2(50),
    prod_type_cd                                            varchar2(5),
    acct_desc                                               varchar2(35),
    country_code                                            varchar2(2),
    acct_ref_ccy_cd                                         varchar2(3),
    nom_accr_int_amt                                        number(20,4),
    ineligible_cash                                         number(20,4),
    pldg_amt                                                number(20,4),
    posn_as_of_dt                                           date,
    moody_rating                                            varchar2(5),
    sp_rating                                               varchar2(4),
    mat_dt                                                  date,
    anl_pct_rt                                              number(20,6),
    acct_pp_cd                                              varchar2(10),
    filler                                                  varchar2(229),
    process_status                                                  char(1)
    Organization External
    type                    oracle_loader
    default directory     TEST_DIR
    access parameters
                             records delimited by newline
                             fields
                                  REC_TYPE                            POSITION(1:1),
                                  ACCT_NBR                            POSITION(2:24),
                                  ACCT_TITLE                          POSITION(25:74),
                                  PROD_TYPE_CD                        POSITION(75:79),
                                  ACCT_DESC                           POSITION(80:114),
                                  COUNTRY_CODE                        POSITION(115:116),
                                  ACCT_REF_CCY_CD                     POSITION(117:119),
                                  NOM_ACCR_INT_AMT                    POSITION(120:139),
                                  INELIGIBLE_CASH                     POSITION(140:159),
                                  PLDG_AMT                            POSITION(160:179),
                                  POSN_AS_OF_DT                       POSITION(180:187) DATE "DDMMYYYY" NULLIF POSN_AS_OF_DT ='00000000',
                                  MOODY_RATING                        POSITION(188:192),
                                  SP_RATING                           POSITION(193:196),
                                  MAT_DT                              POSITION(197:204) DATE "DDMMYYYY" NULLIF MAT_DT = '00000000',
                                  ANL_PCT_RT                          POSITION(205:215),
                                  ACCT_PP_CD                          POSITION(216:225),
                                  FILLER                              POSITION(226:454),
                                  process_status               
    location('ODS_CP_DAILY_EXTRACT.DAT')
    )reject limit unlimited;I wont recieve process_status from feed file ,but I would like to have a default value 'N' to be provided.How to achieve this??I tried using defaultif but it doesnt work him.
    I know it can be donw using CONSTANT keywork using sqlloader.But how about in external tables.??
    Edited by: 792353 on Sep 30, 2010 9:21 PM

    I think it should helpful to you
    http://jiri.wordpress.com/2010/03/29/oracle-external-tables-by-examples-part-4-column_transforms-clause-load-clob-blob-or-any-constant-using-external-tables/
    kanish

  • How to use remote directory for external table

    Hi Folks,
    I have 2 Oracle 11GR2 64 bit database installed on Win 2008 server as prod1 and prod2.
    I have one directory created on prod1 server as EXT_TAB_DIR using the path as D:\OrsDWtest_dir .
    I want to use this directory in Prod2 server and use external table using this remote directory.
    I am able to access the Prod1 directory from Prod2 machine and also i have created Network map drive as Z drive pointing to that prod1 D:\OrsDWtest_dir directory. Also i checked read and Write permissions are there . I am able to create the external table but when i try to fetch the data i m getting below error ..
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file IOMM_20121213_060736.csv in EXT_TAB_DIR not found
    now my doubt is this possible ? Can we use remote directory for External table ? or is there is there any alternative way to achieve same ?
    Thanks & Regards,
    Vikash Jain(DBA)

    could you confirm the name and the existence of this file "IOMM_20121213_060736.csv" ?
    same error like:
    http://www.oracle-base.com/articles/9i/external-tables-9i.php
    if the load files have not been saved in the appropriate directory the following result will be displayed.
    SQL> SELECT *
      2  FROM   countries_ext
      3  ORDER BY country_name;
    SELECT *
    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 14
    ORA-06512: at line 1Edited by: Fran on 10-ene-2013 23:32

Maybe you are looking for

  • SSO Authentication Audit Information for Partner Apps ?

    Hi, Is it possible to get Audit Information to show when a users has been authenticated by SSO for a Partner Application ? If I look at orasso.wwsso_audit_log_view I can see when a user has been authenticated and a row for Portal and each Partner App

  • GCC On Solaris 2.4

    Hello Gents, I'm trying to use the gnu c compiler in a Box with Solaris 2.4 but I've got this message when I try to compile something, also I've got a error message when I'm tryin' to generate the make files for specific program, in this case I'm tal

  • Table names and field names for the PO item details

    Hi, I want table names and field name for the below fields. I have PO number i want to get below fields for PO. <b>Confirmed Ship Date (or actual ship date if already shipped) – PGI Date Quantity of Product to be shipped (base unit of measure) Sales

  • Object Currency is Required in settlement rule creation in CJIC

    Hi,   I am trying to create settlement rule to settle the cost of wbse to Final Asset in CJIC.I want to settle by amount in Object currency.There is no field where I can change it to Object currency,it is in Controlling Area Currency. Any help on thi

  • Oracle AQ to WLS 7 bridge

              I am trying to configure a Messaging Bridge in WLS 7.0 to an Oracle9i Advanced           Queue. I have a startup class that registers AQjmsQueueConnectionFactory in the           WLS JNDI tree (which AFAICT is working).           However, n