Relationship Database: How to combine all Data into one and get the count of it.

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi, currently i hust blindly used this union all by watching few videos.... and combine my datainto one.

All my dummy table has relation ships.
Employess >> Managers > Sr Manager >> Department Head
So in in table or somewhere i can to get the total of all employess in database [in different connected tables]

Please suggest good videos, maybe email me if you have good ones:biggrin:

Thanks again everyone!

Code:
[/FONT]
[FONT=Courier New]SELECT EMPS.EMPS, EMPS.[EMP ID], EMPS.MANAGER, EMPS.[MANAGER ID]
FROM EMPS;[/FONT]

[FONT=Courier New]union all[/FONT]
[FONT=Courier New]SELECT DEPT_LEADR.[DEPT LEADER], DEPT_LEADR.[DEPT LEADER ID], "BlankH" AS BlankH, "BlankH2" AS BlankHr
FROM DEPT_LEADR;[/FONT]
[FONT=Courier New]union all[/FONT]
[FONT=Courier New]SELECT MNGS.MANAGER, MNGS.[MANAGER ID], MNGS.[SNR MANAGER], MNGS.[SNR MANAGER ID]
FROM MNGS;[/FONT]

[FONT=Courier New]UNION ALL SELECT SNR_MNGS.[SNR MANAGER], SNR_MNGS.[SNR MANAGER ID], SNR_MNGS.[DEPT LEADER], SNR_MNGS.[DEPT LEADER ID]
FROM SNR_MNGS;
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top