为什么我会收到错误?
必须声明标量变量@wight
在我的存储过程中?
create PROCEDURE [dbo].Vector
(@word Varchar, @Wight double )
AS
SET NOCOUNT ON;
SELECT
DocId, TermWight * @Wight as "ss", word, id,
wordid, IDF, TFij
FROM TermWeight
WHERE (word = @word) and (TermWight <> 0)
答案 0 :(得分:2)
您正在使用@word但未在任何地方声明。
答案 1 :(得分:2)
你在这里:
CREATE PROCEDURE [dbo].Vector
(@word VARCHAR (100) , @Wight float)
AS
SET NOCOUNT ON;
SELECT
DocId ,
TermWight * @Wight AS 'ss' ,
word ,
id ,
wordid ,
IDF ,
TFij
FROM TermWeight
WHERE (word = @word)
AND (TermWight <> 0)
以前的几个问题。在我的示例中,Varchar应该应用了一个长度(100)。正如其他人所说,Double不是sql类型float是最接近的等价物(我相信)