A
abourg8646 via AccessMonster.com
I have a normalizing union query and the SQL looks like this:
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Time Wkd], "TimeWkd"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Hrs Worked], "Hours Worked"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Contract Hrs], "Contract Hours"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Hol], "Holiday"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Vac], "Vacation"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[LWOP], "LWOP"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Mil], "Mil"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Brev], "Brevement"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[EKV], "EKV"
FROM Schedule
UNION ALL SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[O/T], "O/T"
FROM Schedule;
When I run my report it pulls all the data in a/z format. Is there a way to
sort the data so that it apprear like this D2 D1 DO
TimeWkd 0600 0600 0600
Hours Worked 8 8 8
Holiday 0 0 0
Vacation 0 0 0
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Time Wkd], "TimeWkd"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Hrs Worked], "Hours Worked"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Contract Hrs], "Contract Hours"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Hol], "Holiday"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Vac], "Vacation"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[LWOP], "LWOP"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Mil], "Mil"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[Brev], "Brevement"
FROM Schedule
UNION ALL
SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[EKV], "EKV"
FROM Schedule
UNION ALL SELECT [Employee ID] as EmployeeID, [Date wkd] as DateWkd,
[O/T], "O/T"
FROM Schedule;
When I run my report it pulls all the data in a/z format. Is there a way to
sort the data so that it apprear like this D2 D1 DO
TimeWkd 0600 0600 0600
Hours Worked 8 8 8
Holiday 0 0 0
Vacation 0 0 0