Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone
I have a table contains fields name, year,month,day and another table contains name, year,month
I wanna left join these two tables
How i can do that(i don't have a field day in second table and it causes repeating data )?
i would appreciate if someone can help
Why do you think you need to join these tables?
Perhaps this blog post helps: Fact Table with Mixed Granularity
because these tables have other fields and i need to join
i read the blog post but i can't understand completely for my problem
can you give me a solution with my tables?
Hi elham,
I don't think so it would produce or create a repeating data after joining the tables but it might create missing values depending upon non-matching records.
Regards
Nitin
example of my tables
table one
name,year,month,day...
elham,2010,02,22,...
elham,2010,02,21,....
left join
table 2
name,year,month,accident price
elham,2010,02,24000
accident price repeat 2 times because we have 2 rows in table 1
what can i do to solve this problem?
Hi elham,
output:
Regards,
Nitin.
sorry i wrote a same day by mistake.
i correct above example please check it again
Hi elham,
Yes it will repeat in this case, But there should be another key field in your data that identifies or mapped with your field 'accident price' that shows different value for each line of record and that will remove your repeating data.
You can add that field to remove duplication.
Regards,
Nitin.
i don't have a field day in table2 , my "accident price" is for whole month not a specific day
is there any way to join these tables?