Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I have 3 tables and in each of them I have a date field.
I have defined in each of my table days, weeks and months thanks to the functions ;
Table A:
DateA,
Day(DateA) as Day,
Week(DateA) as Week
Month(DateA) as Month
Table B:
DateB,
Day(DateB) as Day,
Week(DateB) as Week
Month(DateB) as Month
Table C:
DateC,
Day(DateC) as Day,
Week(DateC) as Week
Month(DateC) as Month
The problem is that this lead to the creation of synthetic keys because of the shared columns of each table (Day,week, month).
Do You know any way to join those 3 fields in all my tables without creating synthetic keys ?
Thank you very much
Alexandre
You need to decide if you want to link these tables by Date at all or not or maybe concatenate all dates in a common date field. It's mostly a decision how you want to analyze your data.
See also:
I want all the date fields to be linked meaning that if I select a day in a listbox it will select all the entries related to day(DateA) day(daeb) and Day(datec)
You could link your three tables by a Date key:
Table A:
DateA as DateKey,
DateA
Table B:
DateB as DateKey,
DateB
Table C:
DateC as DateKey,
DateC
and create a single master calendar for DateKey:
Calendar:
DateKey,
Date,
Day(Date) as Day,
Week(Date) as Week,
Month(Date) as Month
Use Concatenate between these three tables. Hope this will help you.
Table A:
DateA,
Day(DateA) as Day,
Week(DateA) as Week,
Month(DateA) as Month;
Concatenate (Table A)
Table B:
DateB,
Day(DateB) as Day,
Week(DateB) as Week,
Month(DateB) as Month;
Concatenate (Table A)
Table C:
DateC,
Day(DateC) as Day,
Week(DateC) as Week,
Month(DateC) as Month;