IsValid Function not Working for "Numeric" Type

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
rager
Participant
Posts: 27
Joined: Tue Jul 17, 2007 11:23 pm
Location: UK

IsValid Function not Working for "Numeric" Type

Post by rager »

Hi,
I have been trying to put in validation checks for a few decimal fields. I saw in one of the forums (viewtopic.php?t=125952&highlight=for+sc ... imal%5C%22) that IsValid("Decimal"...) will give the following warning if the number has no precision.
"Parsing parameters "" for schema type "decimal": Expected precision; got: <eof>"

I am getting this error even when I have precision.

I tried using "Numeric" and I got the following error:
"Invalid type: Numeric."

I have also tried a few other combinations. I am getting an error for all of them.

The input datatype to this function is Varchar(50) - I wanted to put in a validation as users can manipulate this value and I have already had an issue once.

Has anyone come across this before?

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

Post by ray.wurlod »

Would the Num() function be adequate for your purpose?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rager
Participant
Posts: 27
Joined: Tue Jul 17, 2007 11:23 pm
Location: UK

Post by rager »

Hi Ray,
Thanks a lot for the suggestion. It works fine.
Post Reply