T-SQL の case ステートメントに OR を組み込む方法を見つけようとしています。
私は基本的に 2 つのことをチェックしています。どちらかが true の場合は、カウントが 0 であると見なしてください。
COUNT(Case When (car[Weight] IS null) then 0 else car.CarKey
OR When (car.BinNumber is null) then 0 else car.CarKey
End) as Carkey
もこれを試しましたが、構文が間違っています
COUNT(Case When (car[Weight] IS null) then 0
else When (car.BinNumber is null) then 0
else car.CarKey
End) as Carkey