I've just done this for mySql - I presume by SQL you mean SQL Server.
Should be possible to use the same technique.
Create a temporary table
Do a bulk insert from the csv file into this table (need to make sure csv files stick to a rigid syntax)
Use INSERT ... SELECT to transfer data into required table
Delete temporary table
You need to be careful to Lock to avoid data corruption, and deal with the possiblity of
failure - mySql doesn't rollback tables that have been created so you need to make
sure that on a failure the temprary table is deleted etc.
Rafe Fitzpatrick
Web Manager
http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600
Creative solutions in a technical world
----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------
- RE: [ cf-dev ] Importing large amounts of data to sql rafe . fitzpatrick
- RE: [ cf-dev ] Importing large amounts of data to ... rafe . fitzpatrick
- RE: [ cf-dev ] Importing large amounts of data... LIVE Support
- RE: [ cf-dev ] Importing large amounts of data to ... rafe . fitzpatrick
- RE: [ cf-dev ] Importing large amounts of data... LIVE Support
- Re: [ cf-dev ] Importing large amounts of data... Steve Powell
- RE: [ cf-dev ] Importing large amounts of ... LIVE Support
- Re: [ cf-dev ] Importing large amounts... Steve Powell
- RE: [ cf-dev ] Importing large amounts of ... Kola Oyedeji
- RE: [ cf-dev ] Importing large amounts of data to ... Albert Popkov
- [ cf-dev ] SoEditor and XHTML validation Damian Watson
