| 
	
 | 
 Posted by Tim Stahlhut on 08/04/06 05:46 
Look at the external bcp utility command. 
 
T-SQL command BULK INSERT 
 
And as stated in the other reply SQL Server Integration Services. 
 
Tim S 
 
"Ted" <r.ted.byers@rogers.com> wrote in message  
news:1154652822.734806.232860@m73g2000cwd.googlegroups.com... 
> In MySQL, I use "LOAD DATA INFILE 'my_path/data_file.txt'" to load data 
> from a plain text file.  Of course, the actual statement is a bit more 
> complex once one considers the various options (e.g. comma delimited vs 
> tab delimited, record termination strings, &c.). 
> 
> My problem is that I have yet to find the equivalent within MS SQL 
> server.  I did find a LOAD statement in T-SQL, but at first glance it 
> seems to do something completely different. 
> 
> How does one normally load data from a plain text file into a table in 
> MS SQL?  This needs to be relatively efficient since, once in 
> production, it will be used to load tens of megabytes of data into the 
> database (a feed from a data provider).  Is it flexible enough to allow 
> me to specify whether the fields are tab delimited vs comma delimited, 
> optionally enclosed by quotes, record termination charactors, &c.? 
> 
> All I really need is direction to the right part of the T-SQL reference 
> (MS SQL Server 2005).  Anything else, such as examples, is icing on the 
> cake. 
> 
> Thanks 
> 
> Ted 
>
 
[Back to original message] 
 |