You are here: loading data from text files « MsSQL Server « IT news, forums, messages
loading data from text files

Posted by Ted on 08/04/06 00:53

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

 

Navigation:

[Reply to this 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

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