Home » RDBMS Server » Server Utilities » Load first 2000 characters using SQL LOADER
Load first 2000 characters using SQL LOADER [message #210369] Wed, 20 December 2006 08:54 Go to next message
p_hariprasad
Messages: 4
Registered: December 2005
Location: Mumbai
Junior Member
Hi,
I want to load only 2000 characters of a column using control file.Even if the data file has more than 2000 characters for that column. How can i do it.

Re: Load first 2000 characters using SQL LOADER [message #210407 is a reply to message #210369] Wed, 20 December 2006 12:24 Go to previous message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Using SUBSTR?
oracle@mutation#cat d.ctl
LOAD DATA
infile 'd.data'
truncate INTO TABLE d
FIELDS TERMINATED BY "," optionally enclosed by '"' TRAILING NULLCOLS
(
c1 "substr(:c1,1,4)"
)

oracle@mutation#cat d.data
ACCOUNTING
RESEARCH
CHI@CAGO
OPERATIONS
oracle@mutation#sqlldr userid=scott/tiger control=d.ctl

SQL*Loader: Release 9.2.0.7.0 - Production on Wed Dec 20 13:27:06 2006

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Commit point reached - logical record count 4
oracle@mutation#query mutation scott.d

C1
----------------------------------------------------------------------------------------------------
ACCO
RESE
CHI@
OPER

Previous Topic: different character set
Next Topic: FIELDS TERMINATED BY ","; NEED MISS "\," simboll
Goto Forum:
  


Current Time: Sat Dec 10 10:50:52 CST 2016

Total time taken to generate the page: 0.11897 seconds