0
我的腳本如下如何調試「過程或函數'X'的存儲過程錯誤需要參數'@Y',它沒有提供」?
ALTER Procedure [dbo].[spSearch_Stock]
(@KeyW varchar(50),
@Empty int)
AS
BEGIN
SET @Empty = (SELECT COUNT(Customer) FROM tbl_Stock)
IF @Empty > 0
SELECT
StockID, Abb, LotNo, InvoiceNo, TeaState, Customer, Broker,
TeaGrade, Pkgs, NetWeight, TotWeight, PriceUSD, CurrencyRate,
TotalAmtUSD, BrokerageUSD
FROM
tbl_Stock
WHERE
(Abb) LIKE '%'[email protected]+'%'
ORDER BY
StockID ASC, Abb ASC
ELSE
SELECT
'null' as StockID, 'null' as Abb, 'null' as LotNo,
'null' as InvoiceNo, 'null' as TeaState, 'null' as Customer,
'null' as Broker, 'null' as TeaGrade, 'null' as Pkgs,
'null' as NetWeight, 'null' as TotWeight,
'null' as PriceUSD, 'null' as CurrencyRate,
'null' as TotalAmtUSD, 'null' as BrokerageUSD
END
我得到這個錯誤:
Procedure or function 'spSearch_Stock' expects parameter '@Empty', which was not supplied
您可能會打電話給您的SP,不通過兩個參數。 – TheGameiswar
標記您正在使用的dbms。 (這是產品特定的SQL。) – jarlh
哎呀@marc_s,只需要修復標題 - 你拿出了有用的位,並離開「請幫我一個錯誤」;-)' – halfer