Reply to Re: loading data from text files

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация