We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Use WinOasis IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id = object_id(N'[tempdb]..[#slotsinfo]')) DROP TABLE #slotsinfo create table #slotsinfo ( auditdate datetime, slotnumber int, slotmast_id int, meta_id int, elecCoinIn money ) insert into #slotsinfo ( auditdate, slotnumber, slotmast_id, meta_id, elecCoinIn ) select b.auditdate, a.slotnumber, b.slotmast_id, c.meta_id, sum(b.eleccoinin) from cds_slotmast A(nolock) inner join bb_revenue B (nolock) on a.slotmast_id = b.slotmast_id inner join cds_statdetail C (nolock) on c.slotnumber = a.slotnumber where b.auditdate between '2006-07-01 00:00:00.000' and getdate() and b.period_id = '4' and a.active = 'Y' and a.currentrevision = 'Y' and a.slotnumber between '252' and '254' GROUP BY b.auditdate, a.SlotNumber, b.slotmast_id, c.meta_id -- remarked out have to manually run it for debug purposes --select * from #slotsinfo (nolock) order by meta_id, auditdate
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.