SSIS: Reading and Writing Variables in SSIS Script Tasks

October 26th, 2007

Recently I was creating an SSIS script task that needed to read and write to variables. After doing some research, I found some code at this site which simplifies the task.

The code includes a function called ReadVariable which reads in the value of a variable, as well as subroutine called WriteVariable, which writes a value to a variable. I personally prefer using these routines, as you avoid having to configure the ReadOnlyVariables and ReadWriteVariables attributes of the script task, leaving everything in the code of the script.

Post to Twitter Tweet This Post Post to Digg Digg This Post Post to Facebook Facebook

mike SSIS

SSIS: Returning NULL in a conditional statement

October 22nd, 2007

I was working with SSIS the other day, and was trying to get to use a Derived Column Transformation to return a NULL value. It should be pretty straightforward, however it seems you have to cast the NULL expression as a NULL value for it to work properly. Rather than using simply:

TRIM(column_name) == “NULL” ? NULL(DT_STR,27,1252) : TRIM(column_name)

I instead had to use:

TRIM(column_name) == “NULL” ? (DT_STR,27,1252)NULL(DT_STR,27,1252) : TRIM(column_name)

Thanks to this blog entry for pointing me in the right direction.

Post to Twitter Tweet This Post Post to Digg Digg This Post Post to Facebook Facebook

mike SSIS

Welcome To My New Blog

May 29th, 2007

Welcome to my new blog. I plan on using this forum to share my research and technical experiences, specifically relating to Identity Management.

This replaces my old website, trachta.org, which I didn’t spend enough time updating.

Post to Twitter Tweet This Post Post to Digg Digg This Post Post to Facebook Facebook

mike Uncategorized

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.