How to trim newlineChar,blanks on columns [message #205397] |
Fri, 24 November 2006 08:48 |
sharath160
Messages: 9 Registered: August 2006
|
Junior Member |
|
|
Hi,
I use SQL Loader to load some data. But 'TRAILING NULLCOLS' is not very effective sometimes for the last column.
I get newlineCharacters,blanks for one of the column in the Oracle DB.
1) Can anyone suggest how to improve SQLLoader to trim newLine character,blanks.
My ctl file is as below:
LOAD DATA
REPLACE
INTO TABLE ALO1
FIELDS TERMINATED BY "|"
TRAILING NULLCOLS
(
ORDER_TYPE POSITION(1) "decode(:ORDERNo,null,'$',:ORDERNO)",
...
..
ABC "decode(:ABC,null,'$',:ABC)"
)
Sample file:
ABCD|40|ZS04||AM02|IN
2) How to manually trim newLinecharacters,blanks on the column in a table? I used trim as below but of no avail.
update ALO1 set ABC= trim(ABC)
Please advice
Regards,
Sham.
|
|
|
|