Hi everyone,
I am using sqlldr to load data into two different table using a single ctl file.
My CTL FIle is as follows-
LOAD DATA
INFILE test2.dat
APPEND
INTO TABLE test2
WHEN S_NO = ''
FIELDS TERMINATED BY "|"
OPTIONALLY ENCLOSED BY "'"
TRAILING NULLCOLS
(
S_NO ,
NAME ,
AGE
)
INTO TABLE test1
WHEN S_NO!= ''
----------------------------------------------------------------------
FIELDS TERMINATED BY "|"
OPTIONALLY ENCLOSED BY "'"
TRAILING NULLCOLS
(
S_NO POSITION(1),
NAME ,
AGE
)
My data file looks like-
''|'Name1'|'12'
'13'|'Name2'|'23'
The thing is i need to load data depending on value of S_NO column , if it is blank it should go in table test2 and if it has any value it should go in table test1.
Now the second row is being inserted in table test1 but the first row is not inserted in table test2.
So how to compare null column to blanks?
Any help would be appreciated.
thanks
Shubham Shukla