Hi,
I tried with the shell script but it is not loading into table for the below script
#!/bin/bash
#export custno=""
custno=$(awk -F"," '{print NR " " $3}' 'datafile.txt' | grep 1 | cut -d" " -f2)
sed 's/#x#/'$custno'/g' 'ctrl.ctl'
Below is the data file(datafile.txt)
sno,sNAME,35642,reactflag
1,KIRAN,KUMAR
2,SURESH,KUMAR
3,MADHU,VARIGONDA
Here is the control file(ctrl.ctl)
options(skip =1)
LOAD DATA
INFILE 'datafile.txt'
TRUNCATE INTO TABLE LOADER_TEST
FIELDS TERMINATED BY ','
TRAILING NULLCOLS (
sno Integer external,
sname char(50),
custno char(50) CONSTANT '#x#',
reactflag char(50)
)
Please help me in advance