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
 SQL Server Development (2000)
 SQL Server --> File

Author  Topic 

mikebird
Aged Yak Warrior

529 Posts

Posted - 2008-04-21 : 07:32:49
Other that reading from and writing to a database, can SQL interact with OS files? (not .MDF or .BAK or .TRN files)

I need to generate a text file from SQL. There must be a method. Extended procedure? There is a stored procedure working. The output is in a SELECT statement, going nowhere. I tried PRINT, but this turns the output string into a presumed error...

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-04-21 : 07:39:03
BCP?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

mikebird
Aged Yak Warrior

529 Posts

Posted - 2008-04-21 : 08:07:42
How do you run BCP from inside a stored procedure?
Go to Top of Page

mikebird
Aged Yak Warrior

529 Posts

Posted - 2008-04-21 : 10:08:30
The answer to my question

is

xp_cmdshell
Go to Top of Page
   

- Advertisement -