One, You might want to change your query to this::select DATEADD(mm, DATEDIFF(mm,0,o.order_received_date), 0) Order_date, count(*)into #Temp_Ordersfrom Orders o with (nolock) inner join Call_Log cl with (nolock) on o.order_id=cl.order_idWHERE (o.order_received_date >='3/1/2009' and o.order_received_date <='4/1/2009')group by DATEADD(mm, DATEDIFF(mm,0,o.order_received_date), 0)
What count mismatch are you concerned with, 878 and 1250??