Viewing 7 posts - 1 through 7 (of 7 total)
I would if i could, but the tables are built by a program that was written from the manufacturs of the mainframe, each night it rebuilds the tables and then...
March 9, 2012 at 6:13 am
Yes that works. must be down to the way i was trying to explicitly convert it to binary when the & would implicitly do that?
if i do
where C.X_stat & 32...
March 9, 2012 at 5:55 am
if do
select convert(varbinary, C.X_stat)
from C
where C.X_Stat = 0
it returns 0x0C00000100000000
but if i do
select convert(binary(10), 0)
it returns 0x00000000000000000000
I think the problem is the 1 in 9th digit, it always returns this...
March 9, 2012 at 5:43 am
it does and it returns 0 for all rows, which confuses me some more! (not hard i guess)
March 9, 2012 at 5:29 am
looking at that link
In a bitwise operation, only one expression can be of either binary or varbinary data type.
March 9, 2012 at 5:24 am
I have, if i convert 32 (which is decimal in the field) to varbinary i get this
0x0C00000120000000
then in the where clause i try convert(varbinary, C.X_stat) & 32 = 32 i...
March 9, 2012 at 5:19 am
the field is stored as a decimal number which is coming back as '&' operator is incompatible with decimal and int types....
March 9, 2012 at 5:03 am
Viewing 7 posts - 1 through 7 (of 7 total)