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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-09-11 : 14:10:28
|
| jp_schwartz writes "Hi !!!I´m using xp_cmdshell. When I execute it, it performs the task I asked correctly, and returns some rows. I need those rows, or at least the count of them. It could be variables, or a table... anything.OS: WinNTSQL Server 7.0Thanks in advance" |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2002-09-11 : 14:50:26
|
you can insert the results into a temp tablee.g.create table #output(data varchar(255))insert #outputexec master.dbo.xp_cmdshell 'dir /B /A-D c:\windows'select @@rowcount-1 --Get rid of the single NULLdrop table #output HTHJasper Smith |
 |
|
|
|
|
|