Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text file I/O

Status
Not open for further replies.

malladisk

Programmer
Jun 14, 2001
69
US
Hi!
I need to open a text file and read the data from it into an SQL Server 2000 DB. How easy is it to parse strings, read and write to simple .txt files? And I also need to export the data from the DB into a txt file in a predefined format.
Thanks,
Sashi
 

You can use BCP to import or export. However, data manipulation is limited. Bulk Insert can be used to import. If you use Bulk Insert in a stored procedure, you can further manipulate the data with T-SQL.

You should use DTS if you have more complex transformations. DTS is very flexible and allows the use of ActiveX scripts, COM components, FTP, etc. Terry Broadbent
Please review faq183-874.

"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top