How to Handle primary key null handling

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
srao
Premium Member
Premium Member
Posts: 41
Joined: Mon Mar 19, 2007 12:42 pm

How to Handle primary key null handling

Post by srao »

How to Handle primary key null Handling in server jobs
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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...
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply