[thelist] simple method for uploading CSV files to MSSQL

Sean G. ethanol at mathlab.sunysb.edu
Mon Aug 4 22:03:48 CDT 2003


We convert csv files to XML, do some format checking, and feed the XML as a
parameter to a stored procedure that updates the database.  It's not too

I'm stuck with c# and dot net, but you should be able to do the same thing on
the int(er|ra)net with any platform that can take the file and make a database

Let me know if you want more details.


Sean G.
"I'd like to bury my face in two dozen 'Krispy Kreme' glazed donuts & just
lie there & think about Hello Kitty!"--Zippy

>-----Original Message-----
>> give em a file upload and then do a bulk insert.
>> for example:
>>     BULK INSERT databasename.dbo.tablename
>>            FROM 'filepath'
>>            WITH (FIRSTROW = 2
>>               , BATCHSIZE = 200)
>> just look in your sql books for all the parameters and usage info.
>Thinking out loud here: If I create a web interface so they can fire off
>the SQL, their app could drop the data in a specified location, then
>they perform the BULK INSERT using my web interface, then use the web
>analysis tools to sort/filter/report.
>I think that'll work.

More information about the thelist mailing list