Decimal to String conversion in a rule

This forum contains ProfileStage posts and now focuses at newer versions Infosphere Information Analyzer.

Moderators: chulett, rschirm

Post Reply
lshort
Premium Member
Premium Member
Posts: 139
Joined: Tue Oct 29, 2002 11:40 am
Location: Toronto

Decimal to String conversion in a rule

Post by lshort »

I am creating a rule.

src_col1 = 124.000000
I want to change this to 124 (without the decimal or zeros).
c/p from docs:
tostring(value, format string)
Definition: Converts a value, such as number, time, or date, to its string representation.
%i
Represents the value to be converted into a signed decimal integer, such as "123."
According to the documentation the following line of code should do the trick:
tostring(src_col1,'%i')

It does not. The result is 0
Lance Short
"infinite diversity in infinite combinations"
***
"The absence of evidence is not evidence of absence."
akbar2002
Premium Member
Premium Member
Posts: 6
Joined: Wed Jul 11, 2007 11:34 am

Post by akbar2002 »

:idea: Read it as Integer or Bigint. It will do the trick.

Let us know if it works.
Regards,
Akbar.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If this is a Rule Definition, can you specify the value as a global logical variable, as just 124?
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