在Access2000中,新建了一个表,其中有一字段是imp: char,10
但是在操作这一字段时,就会出错:
1.若在Select语句中有这一字段,则报错:语法错误(操作符丢失)在查询表达式'imp'中
2.若在Where子句中有这一字段,则报错:语法错误(操作符丢失)在查询表达式'imp='1''中
请问各位,这是怎么回事?imp在Access中有什么其它用途么?
---------------------------------------------------------------
改成 [imp] 看看是不是保留字
---------------------------------------------------------------
imp是Access的保留字(严格说属于VBA),是一个布尔运算符
运算规则具体参msdn
Performs a logical implication on two expressions.
result = expression1 Imp expression2
Arguments
result
Any numeric variable.
expression1
Any expression.
expression2
Any expression.
Remarks
The following table illustrates how result is determined:
If expression1 is And expression2 is Then result is
True True True
True False False
True Null Null
False True True
False False True
False Null True
Null True True
Null False Null
Null Null Null
The Imp operator performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in result according to the following table:
If bit in expression1 is And bit in expression2 is Then result is
0 0 1
0 1 1
1 0 0
1 1 1