Page 1 of 1

compare

Posted: Wed Oct 19, 2011 11:59 am
by adams06
How can we compare a number with space

Posted: Wed Oct 19, 2011 1:50 pm
by narasimha
Can you provide some example data.

Posted: Wed Oct 19, 2011 2:56 pm
by adams06
123 with " "

Posted: Wed Oct 19, 2011 4:01 pm
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.