G
Guest
Tbl1
SONumber | Customer | Description |…
Tbl2
SONumber | EMPID | TimeCode | Date | Hours
TimeCodes contain the following
DETL
DESN
PENG
MANF
I need to sum the hour data according to TimeCode. So I create a sum query
which ends up looking like this.
SONumber | TimeCode | Hours
5755 DETL 42.5
5755 DESN 35.5
5755 PENG 10
5755 NONEng 100 Not “DETL†Or Not “DESN†Or Not “PENGâ€
Then I create a query to display them all at once and it ends up looking
like this.
SONumber | DETLHours | DESNHours | PENGHours | NONEngHours
5755 42.5 35.5 10
100
5755 42.5 35.5 10
100
5755 42.5 35.5 10
100
5755 42.5 35.5 10
100
Problem 1 I can’t get the DISTINCT statement to have any affect on removing
the duplicate entries. Will one of the Unions work or a Join….
Then I would like to rejoin this data to Tbl1. And that would look like this.
SONumber | Customer | Description |… DETLHours | DESNHours | PENGHours |
5755 Jays Cast Fixture 42.5
35.5 10
NONEngHours
100
SONumber | Customer | Description |…
Tbl2
SONumber | EMPID | TimeCode | Date | Hours
TimeCodes contain the following
DETL
DESN
PENG
MANF
I need to sum the hour data according to TimeCode. So I create a sum query
which ends up looking like this.
SONumber | TimeCode | Hours
5755 DETL 42.5
5755 DESN 35.5
5755 PENG 10
5755 NONEng 100 Not “DETL†Or Not “DESN†Or Not “PENGâ€
Then I create a query to display them all at once and it ends up looking
like this.
SONumber | DETLHours | DESNHours | PENGHours | NONEngHours
5755 42.5 35.5 10
100
5755 42.5 35.5 10
100
5755 42.5 35.5 10
100
5755 42.5 35.5 10
100
Problem 1 I can’t get the DISTINCT statement to have any affect on removing
the duplicate entries. Will one of the Unions work or a Join….
Then I would like to rejoin this data to Tbl1. And that would look like this.
SONumber | Customer | Description |… DETLHours | DESNHours | PENGHours |
5755 Jays Cast Fixture 42.5
35.5 10
NONEngHours
100