Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 我在创建存储过程时遇到了一个问题,即在/_Sql Server_Sql Server 2005_Tsql - Fatal编程技术网

Sql server 我在创建存储过程时遇到了一个问题,即在/

Sql server 我在创建存储过程时遇到了一个问题,即在/,sql-server,sql-server-2005,tsql,Sql Server,Sql Server 2005,Tsql,我在SQLServer2005的表中有一个字段[Product/Services]。现在我想为该表创建一个存储过程,但它不断给出一个错误,当我在表中只放入一个产品时,存储过程工作正常。现在我想把[Product/Services]放在我的表中,那么我该怎么做?在列/变量/参数/表/视图/过程/等名称中包含特殊字符总是一个坏主意。您所有的代码都必须永远围绕这个错误的决定 没有关于您的特定代码和/或错误消息的任何详细信息,我只能提供SQL Server中命名规则的以下链接: 从第二个链接: Mi

我在SQLServer2005的表中有一个字段[Product/Services]。现在我想为该表创建一个存储过程,但它不断给出一个错误,当我在表中只放入一个产品时,存储过程工作正常。现在我想把[Product/Services]放在我的表中,那么我该怎么做?

在列/变量/参数/表/视图/过程/等名称中包含特殊字符总是一个坏主意。您所有的代码都必须永远围绕这个错误的决定

没有关于您的特定代码和/或错误消息的任何详细信息,我只能提供SQL Server中命名规则的以下链接:

从第二个链接:

Microsoft SQL Server没有 识别变量名并存储 程序参数是 分隔。这些类型的标识符 必须遵守定期检查的规则 标识符

您最好只将列命名为
Product\u Services
ProductServices
,您可以将局部变量和参数命名为
@Product\u Services
@ProductServices


下一个最佳选择是不使用该表,只将局部变量命名为
@Product\u Services
@ProductServices
,即使该表列的名称为
[Product/Services]

尝试在列/变量/参数/表/视图/过程/etc名称中包含特殊字符总是一个坏主意。您所有的代码都必须永远围绕这个错误的决定

没有关于您的特定代码和/或错误消息的任何详细信息,我只能提供SQL Server中命名规则的以下链接:

从第二个链接:

Microsoft SQL Server没有 识别变量名并存储 程序参数是 分隔。这些类型的标识符 必须遵守定期检查的规则 标识符

您最好只将列命名为
Product\u Services
ProductServices
,您可以将局部变量和参数命名为
@Product\u Services
@ProductServices


下一个最佳选择是不使用该表,只将局部变量命名为
@Product\u Services
@ProductServices
,即使该表列的名称为
[Product/Services]

请确保正确地将名称Product/Services引用为[Product/Services]无论何时,当你提到它或使用它重新定义它。[]是MS SQL Server中的引号字符。

在引用产品/服务或使用其重新定义产品/服务时,请确保正确地将其名称引用为[Product/Services]。[]是MS SQL Server中的引号字符。

使用特殊字符(表或列的名称)是错误的想法。共享您获得的代码和错误消息是错误的想法使用特殊字符(表或列的名称)。共享您获得的代码和错误消息