dbTalk Databases Forums  

What T-SQL Command can I use?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss What T-SQL Command can I use? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Torain
 
Posts: n/a

Default What T-SQL Command can I use? - 02-08-2004 , 12:24 PM






I obtained a return value from a store procedure.
What T-SQL command can help me to write this return value
into a .txt file on hard drive?
Thanks for help.

-Tom


Reply With Quote
  #2  
Old   
Hari
 
Posts: n/a

Default Re: What T-SQL Command can I use? - 02-08-2004 , 12:31 PM






Hi,

Execute the stored procedure from command prompt,

osql -U user -P password -S Servername -d databse name -Q "Procedure name
wirh parameters" -o "c:\sp_result.txt" -n

This command will redirect the output of procedure to sp_result.txt in c
drive of SQL Server.

Thanks
Hari
MCDBA





"Tom Torain" <TST_MC (AT) hotmail (DOT) com> wrote

Quote:
I obtained a return value from a store procedure.
What T-SQL command can help me to write this return value
into a .txt file on hard drive?
Thanks for help.

-Tom




Reply With Quote
  #3  
Old   
Jeff Block
 
Posts: n/a

Default Re: What T-SQL Command can I use? - 02-10-2004 , 02:46 PM



You may want to use isql vs osql. osql has the added overhead of using ODBC.
"Hari" <hari_prasad_k (AT) hotmail (DOT) com> wrote

Quote:
Hi,

Execute the stored procedure from command prompt,

osql -U user -P password -S Servername -d databse name -Q "Procedure name
wirh parameters" -o "c:\sp_result.txt" -n

This command will redirect the output of procedure to sp_result.txt in c
drive of SQL Server.

Thanks
Hari
MCDBA





"Tom Torain" <TST_MC (AT) hotmail (DOT) com> wrote in message
news:c1e101c3ee70$c4247fa0$a101280a (AT) phx (DOT) gbl...
I obtained a return value from a store procedure.
What T-SQL command can help me to write this return value
into a .txt file on hard drive?
Thanks for help.

-Tom






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.