compare

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
adams06
Participant
Posts: 92
Joined: Sun Mar 12, 2006 3:00 pm

compare

Post by adams06 »

How can we compare a number with space
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Can you provide some example data.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
adams06
Participant
Posts: 92
Joined: Sun Mar 12, 2006 3:00 pm

Post by adams06 »

123 with " "
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You don't need to do anything. They will be compared as strings, since at least one of the operands is a string. If you want to force a right-justified (numeric) comparison, use the Compare() function, whose third argument specifies the justification. In this case the space will be treated as zero.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply