Hi all, I have a really long bit of query that uses temporary tables and others to generate a list of rows.
My problem is I want to store the final values returned by the query in a physical table for reporting purposes to be quicker. This process would be repeated on a daily basis.
I am quite new at SSIS so any help would be appreciated.
Thank you .
select mainnumber,revenue AllRevenue
from nrmevent with (nolock, index(IX_EventStartDate))
where EventStartDate = 20100413
select tigomainnumber,sum(AllRevenue) AllRev
group by mainnumber
SELECT Adate, right(PARTYNUMBER,9) isdn,
DURATION EventMinutes, NORMALFEE Revenue
FROM RECj1 with (nolock, index(IX_adate))
inner join dimCodes j2 on j1.otherPARTYNUMBER = j2.ISDN
where ADATE = convert(varchar,getdate()-1,112)/*Yesterda*/
SELECT Adate, isdn, COUNT(*) CallCounts,
SUM(EventMinutes/60.0) EventMinutes, SUM(Revenue/10000.0)Revenue
group by adate, isdn
select Adate, ISDN, #tmpSubsCAllcenter.Revenue,Callcount,Eventminutes,Classification
inner join CubeData..Subscribers
on isdn = MainNumber where EventStartMonth = 201002 /*convert(varchar(6),GETDATE(),112)-1*/
group by Adate, ISDN,Classification,#tmpSubscenter.Revenue,Eventminutes,callcount
order by adate
select Adate, ISDN, Revenue,Callcount,Eventminutes,Classification,AllRev,allcalls
inner join #rev on #rev.mainnumber = isdn
/* want to store this in a physical table*/
select Adate, ISDN, Revenue,Callcount,Eventminutes,Classification,AllRev
from #tmpAll order by allrev desc