Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error in laoding data from a text file

717817Feb 25 2010 — edited Feb 26 2010
Hello Experts,

I am having some trouble well to be honest lots of trouble with the following file.

I have this text file that i need to import in my oracle table.

weekly_eft_repo  1.0                                                                                                       Page: 1
CDC:00304 / Sat Oct-31-2009     Weekly EFT Sweep for 25/10/09 - 31/10/09  Effective Date 03/11/09         Sat Oct-31-2009 22:06:14
----------------------------------------------------------------------------------------------------------------------------------

Bill to
Retailer Retailer Name                  Name on Bank Account           Bank ABA   Bank Acct            On-line Amount  Instant Amount  Total Amount
======== ============================== ============================== ========== ==================== =============== =============== ===============
 0200101 Triolet Popular Store          Triolet Popular Store          111111111  62030100130659            10,868.00            0.00       10,868.00
 0200103 Le Cacharel Snack              Le Cacharel Snack              111111111  62030100130813             9,728.00            0.00        9,728.00
 0200104 Advanced Co-operative Self Ser Advanced Co-operative Self Ser 111111111  111111111                  7,334.00            0.00        7,334.00
 0200105 Chez Popo Supermarket          Chez Popo Supermarket          111111111  61030100044898            30,932.00            0.00       30,932.00
 0200106 Vana Supermarket               Vana Supermarket               111111111  111111111                 17,775.00            0.00       17,775.00
 0200107 Mont Choisy Store              Mont Choisy Store              111111111  62030100130804             8,840.00            0.00        8,840.00
 0200108 Vijay Store                    Vijay Store                    111111111  62030100131229            16,416.00            0.00       16,416.00
 0200109 Neptune Confection             Neptune Confection             111111111  62030100130931            11,077.00            0.00       11,077.00
 0200110 Antoine Store                  Antoine Store                  111111111  111111111                  2,470.00            0.00        2,470.00
 0200111 P.S.C Cold Storage             P.S.C Cold Storage             111111111  111111111                 10,431.00            0.00       10,431.00
 0200113 Mini Prix Boutique             Mini Prix Boutique             111111111  62030100131501            26,315.00            0.00       26,315.00
 0200114 Hotel Cassim                   Hotel Cassim                   111111111  111111111                135,147.00            0.00      135,147.00
 0200116 Aman Snack                     Aman Snack                     111111111  62030100129481             7,334.00            0.00        7,334.00
 0200117 Best For Less Company Ltd      Best For Less Company Ltd      111111111  111111111                  3,325.00            0.00        3,325.00
 0200118 Central Way                    Central Way                    111111111  111111111                 25,137.00            0.00       25,137.00
 0200119 Amba Veerapen                  Amba Veerapen                  111111111  62030100129436            34,656.00            0.00       34,656.00
 0200121 Tang Way                       Tang Way                       111111111  111111111                 79,002.00            0.00       79,002.00
 0200122 Football Pools Collector       Football Pools Collector       111111111  111111111                 17,024.00            0.00       17,024.00
 0200123 Kim Lee                        Kim Lee                        111111111  62030100129422            18,544.00            0.00       18,544.00
 0200126 Chez Andrex                    Chez Andrex                    111111111  111111111                113,734.00            0.00      113,734.00
 0200127 Sungkoora Pools & Lottery Hous Sungkoora Pools & Lottery Hous 111111111  111111111                 77,368.00            0.00       77,368.00
 0200128 Sun Boutik                     Sun Boutik                     111111111  62030100131324            21,033.00            0.00       21,033.00
 0200129 Guranna Pools House            Guranna Pools House            111111111  111111111                 51,661.00            0.00       51,661.00
 0200130 AH King                        AH King                        111111111  111111111                 19,475.00            0.00       19,475.00
 0200131 S. D. S Pools House            S. D. S Pools House            111111111  62030100129409            25,346.00            0.00       25,346.00
Code for the import
CREATE TABLE weekly_eft_temp
(
  Bill_to_Retailer       NUMBER(7),
  Retailer_Name          VARCHAR2(80 BYTE),
  Name_on_Bank_Account   VARCHAR2(80 BYTE),
  Bank_ABA               NUMBER(9),
  Bank_Acct              VARCHAR2(20 BYTE),
  On_line_Amount         NUMBER(10,2),
  Instant_Amount         NUMBER(10,2),
  Total_Amount           NUMBER(10,2)
)
ORGANIZATION EXTERNAL
  (  TYPE ORACLE_LOADER
     DEFAULT DIRECTORY GTECHFILES
     ACCESS PARAMETERS 
       ( RECORDS FIXED 150 FIELDS --includes new line character
      LRTRIM 
      MISSING FIELD VALUES ARE NULL 
       (Bill_to_Retailer      (1:8)     CHAR(9), 
        Retailer_Name         (10:39)   CHAR(30), 
        Name_on_Bank_Account  (41:70)   CHAR(30), 
        Bank_ABA              (72:81)   CHAR(10),
        Bank_Acct             (83:102)  CHAR(20)
        On_line_Amount        (104:118) CHAR(15), 
        Instant_Amount        (120:134)  CHAR(15), 
        Total_Amount          (136:150)   CHAR(15) 
       ) 
       )
     LOCATION ('weekly_eft_report_c00381.rep')
  )
REJECT LIMIT UNLIMITED
NOPARALLEL
NOMONITORING;
but i am having the following error

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: "column, enclosed, exit, (, ltrim, lrtrim, ldrtrim, missing, notrim, optionally, rtrim, reject, terminated"
KUP-01007: at line 1 column 26
ORA-06512: at "SYS.ORACLE_LOADER", line 19
Can anyone help me please. Thanks

Edited by: Kevin CK on 25-Feb-2010 03:33
This post has been answered by Solomon Yakobson on Feb 25 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2010
Added on Feb 25 2010
7 comments
886 views