Archives of the TeradataForum
Message Posted: Thu, 29 Jul 1999 @ 18:19:04 GMT
Are you able to redefine your tables so that they are defined using numeric datatypes?
If so, something like this would work for you:
select cust_id, int_val from test where ((int_val / (2 ** (3-1))) (INTEGER)) mod 2 = 1 order by 2
where the number 3 in the where clause is the bit number you wish to test (starting from 1 for the least significant bit).
If you could redefine your tables you may have a new problem in that an INTEGER is only 4 bytes, not 5.
I hope this helps in some small way.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|