Archives of the TeradataForum
Message Posted: Fri, 23 Jan 2010 @ 00:39:41 GMT
I need help with a UDF that performs BITAND operation on a decimal integer.
(0,1,1,0,0,0,0) decimal equivalent of this is integer 48. Now is there a UDF that takes a decimal and identifies which bit has been set. In this example of 7 bits bit 5 & 6 have been set.
select bitand(48,64) ,bitand(48,32) ,bitand(48,16) ,bitand(48,8) ,bitand(48,4) ,bitand(48,2) ,bitand(48,1);
should yield non zero number for 32 & 16.
Thanks and appreciate your help.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|