M
Marshall Smith
I have a timesheet database I'm working on. As part of the period
allocations, I run a series of queries to calculate the amount of hourly
labor to charge to the various jobs. I then have a separate set of queries
to calculate the amount of salaried labor to charge. Now, from each side, I
have a query that lists Job Number, Cost Code, and Total Labor that are
charged in that period.
My problem is that I now want to put the two queries together, so that I can
sum up all the charges for each job neatly. Visually, I want to take the
results of one query, and append them to the results of the other query.
I would rather not use a temporary table for performance reasons. I also
cannot simply take the master list of Job Numbers and do left joins against
that, as some of the Job Numbers in the queries will not be in the master
list. (Don't ask. It's a major pain in my @$$, because it's violating all
kinds of the good design rules I used when building the database. It's
currently unavoidable.)
Any help would be appreciated.
allocations, I run a series of queries to calculate the amount of hourly
labor to charge to the various jobs. I then have a separate set of queries
to calculate the amount of salaried labor to charge. Now, from each side, I
have a query that lists Job Number, Cost Code, and Total Labor that are
charged in that period.
My problem is that I now want to put the two queries together, so that I can
sum up all the charges for each job neatly. Visually, I want to take the
results of one query, and append them to the results of the other query.
I would rather not use a temporary table for performance reasons. I also
cannot simply take the master list of Job Numbers and do left joins against
that, as some of the Job Numbers in the queries will not be in the master
list. (Don't ask. It's a major pain in my @$$, because it's violating all
kinds of the good design rules I used when building the database. It's
currently unavoidable.)
Any help would be appreciated.