我遇到了这个How Do I Sequentially Number Records in an Access Query 以便根据我发布的这个stackoverflow 问题(我从来没有做我想要做的事情)做我想做的事情,但每次我尝试将 AS Counter 添加到我得到的查询中
The expression you entered contains invalid syntax
You may have entered an operand without an operator
使用以下 sql:
SELECT Maintable.NumBR, Maintable.*, [Ehow] AS Expr1
FROM Maintable
WHERE (((Maintable.[NumBR])=""
Or (Maintable.[NumBR]) Like "3101"
Or (Maintable.[NumBR]) Like "3541"
Or (Maintable.[NumBR]) Like "4381"
Or (Maintable.[NumBR]) Like "AS3281"
Or (Maintable.[NumBR]) Like "4260"
Or (Maintable.[NumBR]) Like "4315"
Or (Maintable.[NumBR]) Like "4330"
Or (Maintable.[NumBR]) Like "4382"
Or (Maintable.[NumBR]) Like "9410"
Or (Maintable.[NumBR]) Like "9570"
Or (Maintable.[NumBR]) Like "AS3710"
Or (Maintable.[NumBR]) Like "AS4450"
Or (Maintable.[NumBR]) Like "K400"
Or (Maintable.[NumBR]) Like "3100"
Or (Maintable.[NumBR]) Like "3130"
Or (Maintable.[NumBR]) Like "3280"
Or (Maintable.[NumBR]) Like "3495"
Or (Maintable.[NumBR]) Like "3540"
Or (Maintable.[NumBR]) Like "3610"
Or (Maintable.[NumBR]) Like "3700"
Or (Maintable.[NumBR]) Like "4110"
Or (Maintable.[NumBR]) Like "4200")
AND (([Ehow])=DCount("[NumBR]","[Maintable]"," [NumBR] <= " & [NumBR])));
编辑上一个 stackoverflow 问题中提出的问题回答了这个问题。