click the result window and click save button .is that simple ?

解决方案 »

  1.   

    you can create temp table to handle the output of stored procedurecreate table #temp1( ...)
    insert int #temp1 exec wf_reg
      

  2.   

    1.pls try:EXEC master..xp_cmdshell 'osql  -Q "select * from hdlm.pubs.dbo.sales" -o "c:\sales.txt" -S"hdlm" -U"sa" -P"admin"'
      

  3.   

    2.pls try:
    EXEC master..xp_cmdshell 'osql  -Q "sp_helptext sp_name" -o "c:\sales.txt" -S"hdlm" -d pubs -U"sa" -P"admin"'
      

  4.   

    how to get the reference of osql
      

  5.   

    为什么执行下面的语句
    exec master..xp_cmdshell N'bcp "select text from ltdata..syscomments where id=object_id(''wf_reg'')" queryout d:\1.txt -c -q -Slocalhost -Usa -Padmin'会得到:
    NULL
    开始复制...
    NULL
    已复制了 0 行。
    数据包的大小(字节): 4096
    时钟时间(毫秒): 共      1
    NULL文件是空的????
      

  6.   

    leimin(黄山光明顶) :
    你的方法得到的结果有列名,不要行吗?
      

  7.   

    1.
    exec master..xp_cmdshell N'bcp "select text from ltdata..syscomments where id=object_id(''wf_reg'')" queryout d:\1.txt -c -q -Slocalhost -Usa -Padmin'you check the table wf_reg shoule be no comments.
      

  8.   

    leimin(黄山光明顶) :
    会得到:
    NULL
    开始复制...
    NULL
    已复制了 0 行。
    数据包的大小(字节): 4096
    时钟时间(毫秒): 共      1
    NULL文件是空的????