This is a bit rude - but for one of the jobs, I sometimes use Excel.
If you import a CSV file into Excel, you can create a formula that creates the INSERT statement using the string concatenation in the formula. So, if your CSV file contains 3 columns that appear in columns A, B and C in Excel, you can write a formula, for example ...
="INSERT INTO MyTable (Col1, Col2, Col3) VALUES (" & A1 & ", " & B1 & ", " & C1 & ")"
Then you can repeat the formula along all lines, copy and paste the answer into a text file to run in your database.
Like I said - this is rude - but it can be a pretty "quick and dirty" way to get a job!
Chris Roberts Aug 11 '08 at 21:07 2008-08-11 21:07
source share