Home » RDBMS Server » Server Utilities » Dropping Leading Zeroes in SQL*Loader Control File
Dropping Leading Zeroes in SQL*Loader Control File [message #69647] Wed, 13 February 2002 07:13 Go to next message
Rob Thompson
Messages: 2
Registered: February 2002
Junior Member
I am having a problem with SQL*Loader. I am using Oracle verison:

Oracle8i Enterprise Edition Release 8.1.7.1.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.1.0 - 64bit Production

And SQL*Loader version:

SQL*Loader: Release 8.1.7.0.0 - Production on Wed Feb 13 11:59:21 2002

I have a table defined as:

VN NUMBER(10)
OFLDIND VARCHAR2(9)
OADDRYRS VARCHAR2(2)

<< rest of columns omitted for brevity >>

And I have a control file defined as:

INFILE 'n:archiveytdallsp.dat'
BADFILE 'n:logsload_ytdallsp_rjts.lst'
DISCARDFILE 'n:logsload_ytdallsp_discards.lst'
REPLACE
INTO TABLE YTDALLSP_WORK
WHEN CHECKIT <> 'TEST' AND VN '**********'
TRAILING NULLCOLS
( VN POSITION(01:10) CHAR
,CHECKIT POSITION(1386:1389) CHAR
,OFLDIND POSITION(1425:1425) CHAR
,OADDRYRS POSITION(1426:1427) CHAR
)

During the load of the table the column called VN has data that has leading zeroes. The leading zeroes are being truncated from the data as it is loaded into the table.

Anyone know of a way to preserve the leading zeroes?

Any help would be greatly appreciated.

Rob Thompson
Re: Dropping Leading Zeroes in SQL*Loader Control File [message #69650 is a reply to message #69647] Wed, 13 February 2002 11:49 Go to previous message
Bala
Messages: 205
Registered: November 1999
Senior Member
VN column is numeric right?
make it as char or varchar2 to keep leading zeros..
Previous Topic: Re: Pro*C compiler
Next Topic: Re: SQL Loader hangs - please help
Goto Forum:
  


Current Time: Fri Apr 26 08:57:03 CDT 2024