SQL Loader to Append Data
Hi there
I worked on Mukund's suggestion to use sqlloader...it worked successfully.
this is the main shellscript
LoadMain.sh
Code:
#!/usr/bin/ksh
DB_LOGIN=SOMESYSTEM
DB_PASSWORD=SOMEPASSWD
DB_NAME=SOMENAME
FILENAME="$1"
sqlldr ${DB_LOGIN}/${DB_PASSWORD}@${DB_NAME} control=tryloader log=mlist2.log data=mlist2.txt
echo "I am done"
-------------
data=mlist.txt is the Input text file which contains data with delimiters.
control=tryloader.ctl is the Control file which contains information as to how the data will be appended to the table...
My tryloader.ctl contains :
Code:
LOAD DATA
APPEND INTO TABLE SendMailDetails
(
AcctNo CHAR TERMINATED BY ",",
Salutation CHAR TERMINATED BY ",",
Name CHAR TERMINATED BY ",",
BillDate CHAR TERMINATED BY ",",
TotalDue DECIMAL EXTERNAL TERMINATED BY ",",
...and other fields
)
And again..thanks Guys....
Amruta Pitkar
|