Scheduling SQL Scripts Using Jenkins

  • Comments posted to this topic are about the item Scheduling SQL Scripts Using Jenkins

  • It looks like something weird happened when copying and pasting the "SQL script to initiate a backup of a database."

    SELECT @MyFileName='C:\PS\SQLScript\Backup\' + REPLACE(cast(cast(convert(nvarchar(20) as nvarchar(max)) as nvarchar(max)),cast(cast(GetDate() as nvarchar(max)) as nvarchar(max)),cast(cast(120 as nvarchar(max as nvarchar(max))))),':','-') + '.bak'

    This portion does not even make sense:

    cast(cast(convert(nvarchar(20) as nvarchar(max)) as nvarchar(max))

    It looks like the code got over-processed by something after starting out something like this:

    SELECT @MyFileName = N'C:\PS\SQLScript\Backup\' + REPLACE(CONVERT(nvarchar(max), GETDATE(), 120), N':', N'-')+ '.bak';

     

    • This reply was modified 3 years, 4 months ago by  JediSQL.

    Sincerely,
    Daniel

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply