May 2008

Using NOT IN with NULL Values in T-SQL

Recently I discovered a little quirk in T-SQL when using NOT IN with NULL values in the list of values to check.  I use the term “quirk” loosely here because the behavior is exactly as designed in SQL Server, though it may not be obvious. Using NOT IN with NULL Values Here’s how it works. If you use a static…


SSIS expression language conditional operator

The SSIS expression language is a powerful yet enigmatic entity.  Once you get used to its syntax – which is part C#, part T-SQL and part *WTH?!?* – it’s actually somewhat fun to use.  However, one thing it appears to be lacking is the ability to use an if/then/else statement. However, there actually is such an instrument, though it doesn’t…