![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello All, I created a time dimension from a calendar table that I created to store all time frames. However, when I used the calendar table it is not grabing all the dates because of the time associated with the dates, i.e. in the fact table I have 2005-03-04 16:35:50 and in the calendar table it is just 2005-03-04 00:00:00. I would like this join to be used : select DISTINCT lf.datecreated, lf.adnumber, lf.adreplyid from dbo.Leads_FACT as lf JOIN rcadreplies as r on lf.adreplyid = r.adreplyid JOIN rcads as a on a.adid = r.adid JOIN rczipcode as z on z.zipcode = a.zip JOIN rcarea as ar on ar.areaid = z.primaryareaid JOIN rcmetro as m on m.metroid = ar.primarymetroid JOIN calendar as cl on DatePart(year,cl.dt) = DatePart(year,lf.datecreated) and Datepart(month, cl.dt) = DatePart(month,lf.datecreated) and Datepart(dd, cl.dt) = DatePart(dd,lf.datecreated) How can I modified the joins in OLAP to the above query? |
![]() |
| Thread Tools | |
| Display Modes | |
| |