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.
| Author |
Topic |
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2010-03-03 : 14:58:05
|
| Hi can any one helpme out to store the output of the below queryin a local machine,without using xp_cmdshellDeclare @objectName varchar(1000),@Command NVARCHAR(500)set @objectName='dt_droppropertiesbyid'SET @Command = 'sp_helptext [' + @objectName + '] 'Exec (@Command)--output will be the definition of stored procedures |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-04 : 01:59:21
|
| you can choose result to file option from query->results to on top menu------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2010-03-04 : 09:34:28
|
How this can be done through T-Sql statement quote: Originally posted by visakh16 you can choose result to file option from query->results to on top menu------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
|
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-04 : 09:35:38
|
| you need to use bcp then------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2010-03-04 : 10:00:08
|
i tried like thisDECLARE @cmd VARCHAR(2048) SET @cmd = 'bcp "EXEC pubs..reptq1" queryout' +' "c:\query.txt" -c -Usa -Ppassword' +' -SLOCALHOST"' EXEC master..xp_cmdshell @cmd, NO_OUTPUTbut i dont want to use xp_cmdshellquote: Originally posted by visakh16 you need to use bcp then------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
|
 |
|
|
|
|
|