关于sql server:Azure SQL |创建存储过程 | RequestError:必须声明标量变量 | 珊瑚贝

Azure SQL | Create Stored Procedure | RequestError: Must declare the scalar variable


很快,我正在尝试使用参数创建一个简单的存储过程 (Azure SQL),但我似乎找不到代码有什么问题。

错误

1
[RequestError: Must declare the scalar variable”@TestF”.]

代码

1
2
3
4
5
6
7
8
9
10
11
IF OBJECT_ID ( ‘sampleSP’, ‘P’ ) IS NOT NULL
    DROP PROCEDURE sampleSP;
GO
CREATE PROCEDURE sampleSP
    @TestF nvarchar(100)
AS    
    SET NOCOUNT ON;
    SELECT *
    FROM testT
    WHERE testF = @TestF;
GO
  • 这在 SQL 2014 本地产品上运行良好。你确定这个确切的代码重现了这个问题吗? 1 用于可执行的重现代码。
  • @usr 是的,我正在使用 npm 繁琐的模块运行确切的代码
  • 感谢您及时的回复。毕竟这是 npm 模块没有同时执行 2 个事务的问题!


您用来运行它的 node.js 模块可能不支持 GO 批处理分隔符。 SQL Server 不知道 GO 是什么意思。这是一个客户端的概念。删除它。


来源:https://www.codenong.com/32222614/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_8689.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?