Dear Friends,
How can i sent the results of a stored procedure to a Text File (Text Format) in SQL Server 2000
thanx
Printable View
Dear Friends,
How can i sent the results of a stored procedure to a Text File (Text Format) in SQL Server 2000
thanx
Through SQL Server, correct?
Check out documentation for the osql utility in SQL Server help.
Thanks
We can create a web page (text file with html tags) using sp_makewebtask procedure. But can i to execute through a user defined Stored procedure to create a text file without html tags ?
Like this:
Code:declare @cmd varchar(1000)
select @cmd = 'osql -U -P -S -Q"select * from tablename" -o"c:\mendhak.txt" -w500'
I don't know if there are any stored procedures that let you do this, though. Just create the above proc, and execute it.
exec sp_whatever @cmd
try using spool
Thanks