Home » RDBMS Server » Server Utilities » how to truncate datalength in sqlloader file
how to truncate datalength in sqlloader file [message #71212] Tue, 24 September 2002 23:30 Go to next message
Shalini singh
Messages: 11
Registered: September 2002
Junior Member
Iam facing the problem while importing the data from sqlserver to oracle through SQLLOADER
in SQLSERVER data length is 11 characters and in oracle it is only 10

Is there any column attribute that we can use in sqlloader to load only 10 characters from the read text file.

example,
load data
into table t1
( equip_id
)

I want to upload only 10 characters from the text file
all ten characers may be spaces hence cannnot use trim since it is not null column in the database.

Please do write is anybody is having the solution
Thanx
Re: how to truncate datalength in sqlloader file [message #71215 is a reply to message #71212] Wed, 25 September 2002 04:50 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
u can use SUBSTR
load data 
into table t1
( 
equip_id char "SUBSTR(:equip_id,1,10)"  
)
Previous Topic: Create database fast
Next Topic: Sql Loader: How to insert only selected fields from a CSV file to an Oracle Table
Goto Forum:
  


Current Time: Mon Apr 29 00:03:33 CDT 2024