Page 1 of 1

Set Blanks to nulls

Posted: Thu Nov 22, 2007 8:13 pm
by ds_is_fun
My target dB is SqlServer. Whats a good way to convert blank source data to nulls?

Posted: Thu Nov 22, 2007 8:48 pm
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.

Posted: Thu Nov 22, 2007 11:06 pm
by aakashahuja
A modify stage might help as well.

Posted: Thu Nov 22, 2007 11:19 pm
by ray.wurlod
How? It doesn't have a conditional expression.

Posted: Thu Nov 22, 2007 11:26 pm
by aakashahuja
Oops... missed that point... apologies...