读书人

!ACCESS2003中进行与运算的有关问题

发布时间: 2012-02-05 12:07:14 作者: rapoo

在线等!ACCESS2003中进行与运算的问题,解决就结贴!!
在ACCESS2003中
表table1 有2列col01,col02 (数据类型为整型)
col01 col02
0 0
1 0
1 1
我想执行与运算
select (col01 And col02) as 结果 from table1
但发现当col01与col02都为1时,结果为-1

怎么实现结果为1?




[解决办法]
select
(col01 And col02) as 结果,
abs(col01 And col02) as 结果2,
iif((col01 And col02)=0,0,1) as 结果3
from table1

读书人网 >Access

热点推荐