Toad World® Forums

Is it possible to truncate a specific field SQL*Loader


#1

I was able to load the 500K records with SQL loader ( thank you all for assistance).
However, I am now tasked to do it AGAIN…but to TRUNCATE a specific field to length of 300 ( it is currently 500).

When I tried simply altering the table field size, the records all errored out in SQLLDR log file for being too large.

So I want to truncate the field at 300 when it is loaded ( and get all records to load).

Suggestions?
( I am getting better at SQL Ldr with all the info I have found but have not been able to find info online on the truncation of a single field on load.

Sparkie


#2

This may help

http://www.orafaq.com/wiki/SQL*Loader_FAQ#How_does_one_use_the_SQL.2ALoader_utili
ty.3F

You can modify the data as it goes in. I’m thinking you could use the
SUBSTR() function to trim that data down to the 300 characters.