Welcome to Sign in | Help

Re: Salveaza intr-un .txt

  •  02-05-2007, 4:58 PM

    Re: Salveaza intr-un .txt

    Mie imi merge:

    DECLARE
     @cmd  sysname,
     @var  nvarchar(100),
     @destinatie nvarchar(50)

    set @var='Test'
    set @destinatie='C:\test.txt'
    SET @cmd = 'echo ' + @var + ' > '+@destinatie
    EXEC master..xp_cmdshell @cmd
    GO

     


    Cristian Andrei Lefter, SQL Server MVP
    MCT, MCSA, MCDBA, MCAD, MCSD .NET,
    MCTS, MCITP - Database Administrator SQL Server 2005
    http://sqlserver.ro
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems