SELECT
Counting = ISNULL(COUNT(A.Numbers), 0),
B.Date AS DateX
From Schema1.Table A INNER JOIN Schema2.Table B
ON A.xyz=B.xyz
Where B.Date = GetDate()
Group by B.Date
時々、B.Date
今日の日付がありません。で結果を出力したいと思いますCounting = 0 and DateX = Todays date
。
どうすればいいですか?
ありがとうございました
人気のある編集
A.Numbers = 123;456;789;012,...etc
B.Date = 2012-11-24, 2012-11-24,-212-11-24,2012-11-26
2012-11-24 = 3
したがって、 and をカウントしますが、
I want to show whenに設定すると2012-11-26 = 1
出力はありません。B.Date
2012-11-25
Counting = 0
B.Date = 2012-11-25