Re: Error on SQL Loader

From: george lewycky <gelewyc_at_nyct.com>
Date: 21 Oct 2002 14:39:52 -0700
Message-ID: <68aecc05.0210211339.70871574_at_posting.google.com>


"IQ" <iq1969_at_libero.it> wrote in message news:<gjOs9.57557$%M1.1481777_at_twister2.libero.it>...
> Hi,
> i have a problem loading a txt file, numeric fields, with SQL Loader.
> I have italian settings, "," is decimal separator and "." is thousands
> separator.
> The TXT file is setting in this way : "12345.89".
> Oracle returns this error : "ORA-01722", invalid numeric field.
> I try to change windows setting, forced some environment variables and so
> on...
>
> Sorry for my english, and someone help me please...
>
> Bye

For one have the data and sqlldr code seperate!!!!!!!!

I strongly suggest O'Reilly's "Oracle SQL*Loader" book it helped me a great deal.............

please include your code

below is a sample of one of mine that works fine

george


> sqlldr apps/apps_at_vis ß all one word!!!

Control = loadtbag.ctl < enter a filename containing the code
>

Loadtbag.ctl is shown below:

load data
infile 'c:\MY SQL\oracust.txt' ß flat file of the DATA !!!!

replace					ß replace or append 
into table tbagcust			ß Oracle table created above
fields terminated by '","'       ß delimiter
(AUTH,CUST, NAME,                ß all fields
ADDRESS1,ADDRESS2,ADDRESS3,ADDRESS4,
CITYCOUNTRY,STATE,ZIP,PHONE,CONTACT,DATEADDED )

sample of the data file
NOTE: the first field DOESN&#8217;T have &#8220;,&#8221; preceding it, only succeeding it !!!!!!
This is due to fields terminated by '","' which is the delimiter separating the fields just like we do for spreadsheets

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8

********************************* Top of Data
**********************************
1","0066","ABC BUS MANUFACTURING    ","1506 30TH STREET        
","NORTHWEST
1","0068","ABC RAIL PRODUCTS CORP.  ","11TH & WASHINGTON STREETS","
1","0070","ABCO REFRIGERATION SUPPLY","49-70 31ST STREET        ","
1","0090","ABEE PRINTING CORP.      ","305-1 KNICKERBOCKER AVE. ","
1","0095","THOMAS ABRAHAM           ","80-43 249TH STREET       ","
1","0106","ABSOLUTE LOGIC           ","1189 EAST 56TH STREET    ","
1","0110","ACADEMY BUS TOURS, INC.  ","1515 JEFFERSON STREET    ","
1","0140","ACROSS THE RIVER, INC.   ","49 BLEECKER STREET      
","SUITE 606
1","0141","ADORAMA, INC.            ","42 WEST 18TH STREET      ","
 





 How do I specify the datatype of a field that is 9(5)v99 (hence the data
 looks like 99999 in the source file)? I am guessing for right now that I
 would say
 DECIMAL EXTERNAL(5) (but, how do I tell it the precision - we need 2?).
 Or, can I do INTEGER EXTERNAL(5) and use some function (at load time) to
 divide it by 100?

Here is how to handle it:
fieldname position(1:5) decimal external ":fieldname/100" Received on Mon Oct 21 2002 - 23:39:52 CEST

Original text of this message