Multiple of 100, 1000

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
jweir
Participant
Posts: 134
Joined: Wed Aug 04, 2010 12:31 pm

Multiple of 100, 1000

Post by jweir »

Hello,

I have a requirement to check if a column is a multiple of 100 or 1000. Is there a simple way of doing this?

Also, I am using Netezza, so if there is a Netezza function that does this, please let me know. I have searched but came up empty.

Thanks in advance.
Jweir

--- If strength were all, tiger would not fear scorpion.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Divide by 100, if there's no remainder you are good.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

Mod(InLink.TheColumn, 100) = 0
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

MOD() the field by 100 or whatever... if the answer is zero there's no remainder and thus evenly divisible.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jweir
Participant
Posts: 134
Joined: Wed Aug 04, 2010 12:31 pm

Post by jweir »

MOD works perfect. Thanks guys.
Jweir

--- If strength were all, tiger would not fear scorpion.
Post Reply