Quote:
Originally Posted by games_icon
Hi All!
I need to write a script which reads a file and tries to insert into the DB using those values...
file format:
var1 var2 var3
var4 var5 var6
Now I want to read from the above file and trying to insert like...
insert into table1 values( var1, var2, var3 );
in a loop to cover all rows in the file...
Please help me guys... from yesterday its killing me...
|
cat file| tr ' ' ',' | awk '{print "insert into <tablename> values (" $0 ")" }'