Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: String manipulation with variable

    You can do this in this way.

    Declare @Datestamp as varchar(10)

    SET @Datestamp=Convert(varchar(8),getdate(),112)

    EXEC('BACKUP DATABASE [ReportServer]

    TO DISK = ''D:\MSSQL\BAK\ReportServer'+ @Datestamp+'.BAK''

    WITH FORMAT, COMPRESSION')

Viewing post 1 (of 1 total)