0
我想多值傳遞給SQL Server中的參數的默認值2008多值參數在Microsoft SQL Server 2008
以下是我有:
Declare @PInactive Int
Set @PInactive = Case When @PInactive is null Then (0 , 1) Else @PInactive End
Select
ClientID
,PInactive
From
#Client
Where
PInactive in (@PInactive)
給我上的錯誤然後(0,1) - 說明不正確的語法。我也嘗試用0和1附近的單引號無效。
任何建議將不勝感激。我有很多這些我需要在這個查詢中使用。
感謝, 斯科特
謝謝,效果很好。 – SASUSMC