Hi thanks for the help. It is working fine. I have another question.
How can I use a varible defined in the shell inside sql statement.
For example see the following, it dosent work,
file_name = 20051101
mysql -e "USE DATABASE_NAME; LOAD DATA LOCAL INFILE '/Scripts/tableupload/$file_name.cdr.txt' INTO TABLE $file_name
FIELDS TERMINATED BY '|';"
Give me an idea to fix it.