[thelist] simple method for uploading CSV files to MSSQL

Jeff Howden jeff at jeffhowden.com
Mon Aug 4 14:05:45 CDT 2003


> From: Joel D Canfield
> I'm building an analysis app and need to provide a
> really simple way for a small group of users to upload
> CSV files to MSSQL. 

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.


Jeff Howden - Web Application Specialist
Resume - http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/

More information about the thelist mailing list