Execute SQL Task

  • Hi All,

    I've looked at lots of posts and still have not been able to ascertain why this doesn't work. I'm a newbie to SSIS.

    Have a single Excecute Sql Task, under General Tab: single row, direct input and a sql statement as follows

    select convert(varchar, getdate(), 112) + replace(convert(varchar, getdate(), 108), ':', '') as DateTime

    NO parameter mapping, Result Set Tab: Result Name = DateTime and Variable Name = User::DateTimeString

    When I execute the sql task it runs fine and finishes without errors, but I see no value in the variable and nothing shows in the watch window??

    Tried putting in a parameter, but some posts said this is incorrect, so removed it, didn't work anyway.

    Any suggestions, greatly appreciated. The sql statement in SSMS retruns a varchar datetime string.

    Don

  • It is normal that you cannot see the value in the variables window after the package finishes executing. The value there is used for hard-coded values.

    Try adding a script task after your Execute SQL Task and use a simple messagebox to show the value of the variable.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

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

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