Wednesday, March 7, 2012

Expression - Comparing a variable

Hi,

I have a variables in SSIS:

- object MyObj

How can I write an expression that checks if MyObj is NULL or NOT NULL?

Thank you.

If it's an object type, you'll have to shred it with a foreach loop container first. A script task would likely work as well, but coding is required.

Are you wanting to test if the object is EMPTY or NULL? Two different things.|||

"Are you wanting to test if the object is EMPTY or NULL? Two different things."

You′re absolutely right.

My Data Flow's Record Set Destination puts some row data in MyObj variable.

How can I How can I write an expression to see if MyObj contains some row or none at all (how can I see if it′s empty or not empty?

Thanks once again Mr.Phil Brammer! Smile

|||

The code here might help:

Recordsets instead of raw files

(http://blogs.conchango.com/jamiethomson/archive/2006/01/04/2540.aspx)

-Jamie

|||A row count transformation will store the count of rows that pass through it into an integer variable that you can later work with. Won't that work for you instead?|||

Yes, it worked.

Thank you once again! Smile

No comments:

Post a Comment