Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Sqlloader terminate with TAB errors in ver 8.1.5.0.0

Posted on 2001-08-23
1
858 Views
Last Modified: 2012-06-21
The following CTL script runs OK on version sqlloader 8.0.5.0.0
When I run it on version sqlloader 8.1.5.0.0 I am getting errors :

Record 2: Rejected - Error on table STG_RECIPE, column FORMULA_NAME.
no terminator found after TERMINATED and ENCLOSED field
Record 3: Rejected - Error on table STG_RECIPE, column FORMULA_NAME.
no terminator found after TERMINATED and ENCLOSED field


The terminated by in the CTL file is a TAB ( keyboard tab key ).  I have tried replacing the TAB with X'09' but still get the same error.

<-- CTL file -->
LOAD DATA
INFILE  'c:\fps\Inbound\recipes.txt'
BADFILE 'c:\fps\recipes.bad'
TRUNCATE
INTO TABLE STG_RECIPE
WHEN  (FORMULA_NAME <> 'FORMULA NAME')
FIELDS TERMINATED BY '     ' OPTIONALLY ENCLOSED BY '"'
(FORMULA_NAME,
 PRODUCT,
 STD_FORM_QTY,
 INGREDIENT,
 ITEM_NUMBER,
 QTY_PER_BATCH,
 UOM,
 LAST_UPDATE)

<-- Sample Data: fields are seperated by TAB, some fields are delimited by " -->
"00025G-A02          "     "00025G            "        1600.00     "00416             "        60          90.83     "KG"     "10-JUN-2000 10:19:37.10"
"00025G-A02          "     "00025G            "        1600.00     "00501             "        50          18.25     "KG"     "10-JUN-2000 10:19:37.10"
"00025G-A02          "     "00025G            "        1600.00     "00576             "        20           4.20     "KG"     "10-JUN-2000 10:19:37.10"
"00025G-A02          "     "00025G            "        1600.00     "00595             "        10        1479.02     "KG"     "10-JUN-2000 10:19:37.10"

0
Comment
Question by:seeyou
1 Comment
 
LVL 2

Accepted Solution

by:
AllaI earned 50 total points
ID: 6420371
I've heard about a problem  with FIELDS TERMINATED BY <tab>  OPTIONALLY ENCLOSED BY <something> in 8.1.  The only way I know is to get rid of  OPTIONALLY ENCLOSED BY clause by trimmimg off the double qoutes while loading:
LOAD DATA
   INFILE ...
   INTO TABLE T1
   FIELDS TERMINATED BY X'9'
   ( FORMULE_NAME   "trim( chr(34) from :formula_name )",
     ....    
   )

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question