Set Blanks to nulls

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

Set Blanks to nulls

Post by ds_is_fun »

My target dB is SqlServer. Whats a good way to convert blank source data to nulls?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Convert blank source to null using an If..Then..Else expression. Test whether it's blank - if so, generate null. If not, leave it alone. Might be valuable to Trim() the source before testing. Target is irrelevant, provided that the columns to receive the nulls are nullable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
aakashahuja
Premium Member
Premium Member
Posts: 210
Joined: Wed Feb 16, 2005 7:17 am

Post by aakashahuja »

A modify stage might help as well.
L'arrêt essayant d'être parfait… évoluons.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How? It doesn't have a conditional expression.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
aakashahuja
Premium Member
Premium Member
Posts: 210
Joined: Wed Feb 16, 2005 7:17 am

Post by aakashahuja »

Oops... missed that point... apologies...
L'arrêt essayant d'être parfait… évoluons.
Post Reply