Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
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
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
13 Experts available now in Live!