爲什麼@OpeningDate被保存爲NULL,即使我這樣做。爲什麼日期字段被保存爲空?
PROCEDURE [dbo].[InsertCaseANDHearingDetails]
@HearingDate datetime,
@IsOpeningDate bit= null,
@OpeningDate date= null,
AS
Begin
IF(@IsOpeningDate = 0)
Begin
Set @OpeningDate= (Select Convert(varchar, @HearingDate, 106))
End
Insert Into Hearings
values (@HearingDate, @OpeningDate)
End
即使我計算它,開庭日期不爲空,但爲什麼OpeningDate是越來越保存爲NULL。
包含您對'dbo.InsertCaseAndHearingDetails'的調用。 –