Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 loading simple text from file -- load_file()

Author  Topic 

bucz
Starting Member

1 Post

Posted - 2009-04-26 : 07:05:18
Hi,

I am newbie in MS SQL (MS SQL 2000), I wanted to know how to tload some text from file into result of SELECT statement. In MySQL I had load_file() function that was EASY to use. Here I have read something about BULK INSERT but this tool is too big for what I need to do. For example (to test):

SELECT '111','222',load_file('C:\test\hello.txt')

how a statement like this would look in MS SQL?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-04-26 : 07:20:48
You have a number of options.

1. BCP
2. OPENROWSET
3. BULK INSERT



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -