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
Thanks again everyone!
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
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;