Finding out the contents of a variable at runtime

  • How do you find out the contents of a variable at runtime?

    Say you have a sql task that executes the result to a variable. I want to execute this task in isolation (right click execute task) and view the results that are held by the var.

    Can someone point me in the right direction please?

  • You can view the value of the variable in the watch window. Covered in detail w/ screenshots here:

    http://blogs.conchango.com/jamiethomson/archive/2005/12/05/2462.aspx

  • Right click on the Exec SQL Task and click the Edit Breakpoints... menu item.

    Enable the break point for the Post Execute event. It should by the second one.

    Click OK.

    The task should have a red dot on it.

    Execute the task.

    Execution will pause on the Post Execute event.

    Click on the Locals tab at the bottom of BIDS.

    Expand the Variables node and find you variable.

    The value should be visible there.

    Norman

    DTS Package Search

    http://www.dtspackagesearch.com/

  • Brilliant... thanks guys.

Viewing 4 posts - 1 through 3 (of 3 total)

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