當我運行代碼下面我得到的錯誤消息:過程或函數期望沒有提供的參數?
消息201,過程stp_DespatchedJob,行0過程或函數 「stp_DespatchedJob」預計參數「@JobStatusId」,這是不 供給
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[stp_DespatchedJob]
(
@jobId as bigint,
@DriverId int,
@HasPda bit,
@enablePda bit,
@IsAdvanceJob bit,
@IsAutodespatchedJob bit,
@Controller varchar(100),
@JobStatusId int
)
AS
Begin
if(@enablepda=1 and @haspda=1)
BEGIN
UPDATE BOOKING
SET [email protected],JobOfferDateTime=getdate()
,[email protected],despatchdatetime=getdate()
,Despatchby = @Controller
where [email protected]
END
ELSE
BEGIN
declare @fleetMasterId int
select @fleetMasterId=fleetMasterId from fleet_DriverQueueList where [email protected] and status=1
UPDATE BOOKING
SET BookingStatusId=2,[email protected],despatchdatetime=getdate(),[email protected],Despatchby = @Controller
where [email protected]
END
if(@IsAdvanceJob=1 and @IsAutodespatchedJob=1)
BEGIN
Update booking_autodespatch set despatched=1 where [email protected]
END
End
這是什麼意思?爲什麼我得到這個錯誤?如何擺脫這一點?
你得到什麼錯誤訊息? – dev
消息201,過程stp_DespatchedJob,行0過程或函數「stp_DespatchedJob」需要參數「@JobStatusId」,但未提供 –
存儲的特效跟隨延遲名稱編譯,這意味着對象的存在將不檢查,直到runtime.So我跑你的代碼,我能夠創建並修改它,而無需發佈任何問題。您是否嘗試執行SP – TheGameiswar