Home » RDBMS Server » Server Utilities » SQL loader - import is having issue in new line \n (SQL LOADER , )
SQL loader - import is having issue in new line \n [message #548801] |
Mon, 26 March 2012 06:19  |
 |
rohitmathur11@gmail.com
Messages: 10 Registered: March 2012 Location: INDIA
|
Junior Member |
|
|
Hi,
I am working on 10.2.0.3 database.
The requirement is to insert data from DAT file in to table.
I am using following file to insert data as in date2.csv file.
Data2.ctl
LOAD DATA
INFILE '/home/oracle/data2.csv'
CONTINUEIF LAST != "$"
INTO TABLE emp
APPEND
FIELDS TERMINATED BY X'09'
TRAILING NULLCOLS
(ename,eadd,emob)
Data2.csv
Jack ADD
RE
SS1 9740$
Mike ADD
RE
SS2 0456$
Command to execute sql loader -
sqlldr userid=mtest/mtest@rp10g control=data2.ctl log=data2.log
The current control file is inserting data like following -
ename eadd emob
Jack ADDRESS1 9740
Mike ADDRESS2 0456
But now requrement is like following to insert data in to table ... \n (newline) should be visiable in column data..
As there is a new line in CSV file also in ename filed ....
Like
ename eadd emob
Jack ADD\nRE\nSS1 9740
Mike ADD\nRE\nSS2 0456
there are only 2 rows in table in this case ...
Any idea how to do this ....
[mod-edit: code tags added by bb; next time please add them yourself]
[Updated on: Mon, 26 March 2012 13:50] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Feb 22 20:57:40 CST 2025
|