Gustav Brock
gustav at cactus.dk
Wed Oct 29 13:33:08 CST 2003
Hi John I've noticed the same thing. I don't know why except that bit mapping could be beyond ANSI-SQL. 4 OR 1 is interpreted as True Or True which is .. True. I went away using integer division (\) and modulus (MOD) but that's troublesome as you can see in my post from 2003-10-15 on Re: [AccessD] Math Problem /gustav > Folks, > I'm trying to do boolean operations in a query. I have a table with bit > mapped fields such that the long integer has bits "on" or 1 in specific > circumstances. Now I want to OR in other numbers in SQL. I have a SQL > statement that looks like: > SELECT MsysForms.FRM_GroupOpen, ([MsysForms]![frm_GroupOpen] Or 1) AS NewVal > FROM MsysForms; > regardless of the value contained in the field frm_GroupOpen, the NewVal is > always -1 for an OR or an AND of any other value, and 0 for an XOR. > If I have a 4 in the field, 4 OR 1 should give me 5, but it is giving me -1. > I believe it is "interpreting" it and saying it is true. But why? > John W. Colby > www.colbyconsulting.com