我在一个小桌子上做一个大字符串查找。
当我在MsAccess中执行以下查询时:
SELECT isBit
FROM [SqlServerTableName]
WHERE mycolumnName = "[String Greater Than 128 characters]"
我收到消息:
The identifier that starts with [String Greater Than 128 characters] is too long.
Maximum length is 128.
其次是:
Unclosed quotation mark after the character string [String Greater Than 128 characters]
和
Incorrect Syntax Near [String Greater Than 128 characters]
现在,有办法解决这个问题吗?这个表非常小,并且会保持很小(<1000条记录),所以我不担心字符串比较。
答案 0 :(得分:0)
这是因为您使用双引号("
)而不是单引号('
)。
SQL Server将此视为标识符,而不是字符串文字值。
您应该将查询更改为以下内容:
SELECT isBit
FROM [SqlServerTableName]
WHERE mycolumnName = '[String Greater Than 128 characters]'