Hello,
I have 2 tables: a Loss Run containing injury information at each store and a list of monthly store hours.
I need to merge both these tables into 1, so that I can export it into excel and create a dashboard (using excel 2010).
I'm having a hell of a time figuring out how to do this.
Store hours are sent accumulated on a monthly basis. For instance, for this last month, store 1 might say 5/1/2016 = 2777 hours. This is a sum of all of May's hours, not the specific date.
Secondly, each store may have more than 1 injury per day. For instance, store 1 may have 2 or more injuries on 5/1/16, and I need specific injury information for each injury, so each injury will need it's own row.
The problem I am running into is either hours or injuries are being duplicated as seen below:[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Store[/TD]
[TD]Date[/TD]
[TD]Hours[/TD]
[TD]Injuries[/TD]
[TD]Injury Type[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1/1/2012[/TD]
[TD]2000[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2/1/2012[/TD]
[TD]2500[/TD]
[TD]1[/TD]
[TD]Strain[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2/1/2012[/TD]
[TD]2500[/TD]
[TD]1[/TD]
[TD]Laceration[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]3/1/2012[/TD]
[TD]2300[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]4/1/2012[/TD]
[TD]2500[/TD]
[TD]1[/TD]
[TD]Contusion[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]5/1/2012[/TD]
[TD]2300[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]6/1/2012[/TD]
[TD]2600[/TD]
[TD]1[/TD]
[TD]Sprain[/TD]
[/TR]
</tbody>[/TABLE]
I am not very good with Access or SQL and am not too sure on how to do a Union Query correctly.
Can someone please assist?
I am able to send you the excel workbook containing these tables. I'm not sure how to attach documents directly on this site...
I have 2 tables: a Loss Run containing injury information at each store and a list of monthly store hours.
I need to merge both these tables into 1, so that I can export it into excel and create a dashboard (using excel 2010).
I'm having a hell of a time figuring out how to do this.
Store hours are sent accumulated on a monthly basis. For instance, for this last month, store 1 might say 5/1/2016 = 2777 hours. This is a sum of all of May's hours, not the specific date.
Secondly, each store may have more than 1 injury per day. For instance, store 1 may have 2 or more injuries on 5/1/16, and I need specific injury information for each injury, so each injury will need it's own row.
The problem I am running into is either hours or injuries are being duplicated as seen below:[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Store[/TD]
[TD]Date[/TD]
[TD]Hours[/TD]
[TD]Injuries[/TD]
[TD]Injury Type[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1/1/2012[/TD]
[TD]2000[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2/1/2012[/TD]
[TD]2500[/TD]
[TD]1[/TD]
[TD]Strain[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2/1/2012[/TD]
[TD]2500[/TD]
[TD]1[/TD]
[TD]Laceration[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]3/1/2012[/TD]
[TD]2300[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]4/1/2012[/TD]
[TD]2500[/TD]
[TD]1[/TD]
[TD]Contusion[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]5/1/2012[/TD]
[TD]2300[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]6/1/2012[/TD]
[TD]2600[/TD]
[TD]1[/TD]
[TD]Sprain[/TD]
[/TR]
</tbody>[/TABLE]
I am not very good with Access or SQL and am not too sure on how to do a Union Query correctly.
Can someone please assist?
I am able to send you the excel workbook containing these tables. I'm not sure how to attach documents directly on this site...