|
-
Dec 4th, 2003, 11:53 PM
#1
Thread Starter
Junior Member
How to sent Query Result to a Text File
Dear Friends,
How can i sent the results of a stored procedure to a Text File (Text Format) in SQL Server 2000
thanx
-
Dec 5th, 2003, 06:17 AM
#2
Through SQL Server, correct?
Check out documentation for the osql utility in SQL Server help.
-
Dec 7th, 2003, 02:08 AM
#3
Thread Starter
Junior Member
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 ?
-
Dec 7th, 2003, 09:58 AM
#4
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
-
Dec 8th, 2003, 05:03 AM
#5
Hyperactive Member
-
Dec 8th, 2003, 11:25 PM
#6
Thread Starter
Junior Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|