Move the byte position

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
consulting
Participant
Posts: 50
Joined: Fri Dec 21, 2007 3:24 am

Move the byte position

Post by consulting »

Hi
In my requirement I am finding a feild called XXX which is of 24 byte varchar, It is calculated from the column X which is of 1 byte.

The logic for XXX Concatenated value of 24 months X with latest month being the 1st byte

ie. during very first month run the value in XXX is 00000000000000000000000 (24 zeros)
suppose the value of X is calulated as 1 then XXX should be 1000000000000000000 (x:23zero)
During second month if the value of X is calculated as 2 then XXX should be 21000000000000000000000 (here first byte moved to second byte newly found value in 1 byte)
During third month if the value of X is calculated as 3 then XXX should be 32100000000000000000000 (second byte moved to third,first byte moved to second ,newlt found to 1 byte)
During fourth month if the value of X is calculated as 4 then XXX should be 432100000000000000000000 like this(newly found in first byte,first byte to second byte,second byte to third,third byte to fourth....)

like this when every month is run the recent byte X should be in first position so the first position should be shifted to second second is shifted to third should shift to fourth like this it follows


Thanks
balaji
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? How is this any different from the question you posted here yesterday?

viewtopic.php?t=126332
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply