'' 附近的语法不正确 [英] Incorrect syntax near ''
问题描述
我正在尝试在 SQL Server Management Studio 中运行以下相当简单的查询:
I'm trying to run the following fairly simple query in SQL Server Management Studio:
SELECT TOP 1000 *
FROM
master.sys.procedures as procs
left join
master.sys.parameters as params on procs.object_id = params.object_id
这似乎完全正确,但我不断收到以下错误:
This seems totally correct, but I keep getting the following error:
消息 102,级别 15,状态 1,第 6 行
'' 附近的语法不正确.
Msg 102, Level 15, State 1, Line 6
Incorrect syntax near ''.
如果我去掉连接并且只做一个简单的选择,它就可以工作:
It works if I take out the join and only do a simple select:
SELECT TOP 1000 *
FROM
master.sys.procedures as procs
但我需要加入才能工作.我什至没有有这个查询中的字符串 '' ,所以我不知道它不喜欢什么.
But I need the join to work. I don't even have the string '' in this query, so I can't figure out what it doesn't like.
推荐答案
当您从网页或电子邮件复制代码并且文本包含不可打印的字符(如单个 CR 或 LF 和不间断空格)时,可能会出现此类意外问题.
Such unexpected problems can appear when you copy the code from a web page or email and the text contains unprintable characters like individual CR or LF and non-breaking spaces.
这篇关于'' 附近的语法不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!