Page 1 of 1

Force comparing strings when they contain numbers

Posted: Thu Sep 25, 2008 9:24 pm
by moose2079
Hi there,
During the Load to our Involved Party(IP) table we compare incoming fields to what is on the IP table One field we compare is a Varchar 20 field - we compare that to the incomming varchar 20 field .. if different then update. I have the incomming field set to 000000 and the IP value set to 0. They are different butDataStage returns them as the same - so I am guessing DataStage compares as numbers to optimise performance ... problem is I simply want a string comparison - I have tried str, substrings with no success - they still match - How do I force DataStage t5o compare as string '00000' to string '0' and come back and say they are different? - my current code follows .....
Substrings(In_FDW.FDW_MEID,1,len(In_FDW.FDW_MEID)) = Substrings(In_FDW.MEID,1,len(In_FDW.MEID))

Please advise

:-)

Posted: Thu Sep 25, 2008 9:55 pm
by ray.wurlod
Use Compare() function specifying "L" (left-justified) as the third argument.