Script Task - checking for NULL values
Newbie to SSIS, I know this will be a simple question for most of you. The only thing I am trying to do is check if the package global variables(which are parameters) are null, empty, and blank. Which ever is the best practice. One variable is date and the other is Int32,in the Script Task which is using VB. Thanks!
July 27th, 2011 3:02pm

You could use a Script Task or use an ISNULL expression on a precedence constraint. Indeed they have a default value... Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
July 27th, 2011 3:28pm

You can not do any such things - because variables in SSIS can not be NULL (except for Object typed variables - but you can't specify those as parameters on a command line, or with configurations) So... I'm assuming the situation is that you want to know if anything has been "passed in" to the package or not. (It would help to know exactly how you're attempting to "pass in" these variables... command line /SET, configurations...?) If that's the case, then the only thing you can do is to set these variables to a "known bad" value at design-time - like setting your Int32 variable to -1. As part of the package, you can use a Script Task or precedence constraints to "watch" for this "known bad" value and halt package execution (throw an error) or something of that sort. Talk to me now on
July 27th, 2011 3:36pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics