Null value in nonnullable field

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
mannoo19
Participant
Posts: 6
Joined: Mon May 31, 2004 10:59 am

Null value in nonnullable field

Post by mannoo19 »

Hi ,.,
Can someone help me how can I get rid of a space that is present in a char field..???
I used the conversion:
if trim(DSLink3.SWLNID) = '' then @NULL else trim(DSLink3.SWLNID)
But the problem is that the field is not nullable..so when it finds a '' it tries to put Null there and that is not accepted..
Can someone tell me what should be done??
thanks,
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

If you don't like a space, your logic will put a NULL in its place. If it's a not-nullable column, then I suggest you use a different value to replace the blank or space.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
You can use Ereplace function to get rid of it.

Ketfos
Post Reply