BitXor of two Decimal(38,0) values

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
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

BitXor of two Decimal(38,0) values

Post by zulfi123786 »

Hi,

I have two Decimal(38,0) values and have to perform a bitxor of numerical values contained in the decimal columns and have the result again in Decimal(38,0)

Currently I am breaking the decimal into 3 columns each of bigint type taking 18 digits of string representation (last gets only 2 digits) and then applying the bitxor for each of the 3 pieces and appending back into Decimal.

Is there any better built in approach ? some what like converting decimals to binary (BCD with sign excluded) and apply bitxor and convert back to decimal ?
- Zulfi
Post Reply