Page 1 of 1

How to Handle primary key null handling

Posted: Fri Apr 20, 2007 7:10 pm
by srao
How to Handle primary key null Handling in server jobs

Posted: Fri Apr 20, 2007 8:54 pm
by DSguru2B
There is IsNull() function. You can use that to identify null values and constraint them or pass them down a reject link. If your source is a flat file you might also want to test for zero length.

Posted: Fri Apr 20, 2007 10:53 pm
by chulett
I'm curious... if there something special you are looking for? If so, you'd have to be more explicit what 'primary key null handling' means to you so we can answer the right question.

Or can we assume, like our friend has, that you just mean plain old null detection - in which case the IsNull() or 'trim and test for zero length' advice already given is enough?

Let us know! :wink:

Posted: Sat Apr 21, 2007 2:12 am
by ray.wurlod
If this is a user requirement - or a PHB requirement - just yell in their face that a primary key is, by definition, NOT NULL.

Posted: Sat Apr 21, 2007 6:25 am
by chulett
Right - guessing the OP wants to know how to avoid sending NULL values to a PK. However, given the vagueness of the question...