Forum Discussion
How to create source data, e.g. a 'master calendar'?
- Anonymous10 years ago
amien is your fact table in SQL as well? Or does it come from an independent source?
Just taking a quick look at this again, if everything is in SQL, you can make the code that populates the date dimension tables a procedure and pass in the min/max from the fact table +/- additional months (easy enough to add to the dates you return from the fact table.
Would look something like
Sproc1 - SSCentral script changed to procedure with input parameters for the dates.
Sproc2 -
1) Select start and end date from the fact table
2) Execute the date dimension procedure with the values from the fact table
Anonymous Thanks for the link for sqlservercentral. I have one additional question. It will create a function and when you hit invoke, you can enter two dates (start and end).
Question : how would it be possible to make the start and end date dynamic based on the loaded fact table? So if i could put the min date and max date in some kind of variable and use it in the just created calender function
amien is your fact table in SQL as well? Or does it come from an independent source?
Just taking a quick look at this again, if everything is in SQL, you can make the code that populates the date dimension tables a procedure and pass in the min/max from the fact table +/- additional months (easy enough to add to the dates you return from the fact table.
Would look something like
Sproc1 - SSCentral script changed to procedure with input parameters for the dates.
Sproc2 -
1) Select start and end date from the fact table
2) Execute the date dimension procedure with the values from the fact table
- Greenrjc10 years agoFrequent Visitor
Hi
I have a related query (I think)
Each time I create a new report I have to re-processes the Query for my Calendar Date Table.
Is there anyway to automate this process or to ensure each New report loads the edited Calendar Date Table automatically?
Currently I have a notepad pinned to desktop with the code to copy paste every time.
- frederik9 years agoFrequent Visitor
Here's a solution using a calculted table in just 2 steps