当我运行代码下面我得到的错误消息:过程或函数期望没有提供的参数?
消息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