Viewing 2 posts - 1 through 2 (of 2 total)
I agree its important to test. I performed a similar test with a variable table and a temp table. The variable table was about 20% slower than using a temp table. If...
May 17, 2005 at 7:16 am
#559247
Try this SQL:
select ownerid, SUM(case when status='yes' then 0
else nocnt end) as nocnt
from #tblA
where status IN ('no','yes')
group by ownerid
April 15, 2005 at 7:30 am
#552905