Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to suit the dates in the 3 tables so that i will have the ability to make sales Comparison between the 3 tables : sales, sales history and budget.
the comparison between sales vs sales history should be made on a daily and the comparison sales vs budget should be made on a monthly.
the budget table is budget 2010.
In addition, how can i cancel the loops between the tables by keys table?
Alon
Firstly rename 2 of the fields called SALES to say:
That will eliminate the unwanted joins you have.
Then you probably need to add a Master Calendar, as per page 5 of this pdf Generating missing data.pdf
I expect you;ll need to change all you date filed names to the same name to join on them and onto the Calendar.
Your budget is at the Month level so that is level you need to do yo comparisons at.
Best Regards, Bill
you can create the Date_Link table having all the data fields with Fact table name.
Alon,
Your data model is good here are some suggestions from my side :
---You are using sales as Key to join all ,is it right because it may be that on two different dates there is same sales
---use joins to append the two tables
---use dates as key they will be better .
how can i suit the dates in the 3 tables?
Ok then it means you are not having any Key
Can you tel me pleas how can i suit the dates in the 3 tables?
Hi alon,
when you want to compare sales present in sales, sales history and budget tables rename those sales fileds as sales and sales_budget and sales_history respectively and link all the tables using dates column you can create date as link_date and month(date) as link moth in sales table and use link_date as key between sales and sales history and use link_month as key between sales and sales_budget. Then the loops will not be formed.
Regards,
Abhishek