Evening,
I can not figure out what I am missing on the following select statement, where the output of the select statement with sums on the two hours fields. Would like to direct it to a table created by doing a select into with only 3 pieces of data for member. Then I can join with the members detail table to compile the information.
This works, but I have not been able to get just three pieces of data to write into another table.
select "nmember", sum(volhours) as Vol, sum(advtrnghrs) as ADV
from "Naturalisthrs".naturalisttimesheet group by nmember
When I tried doing the same idea in this query, I get names but no sums for each member.
select "Lname", "Fname", sum(volhours) as Vol, sum(advtrnghrs) as ADV
from "Naturalisthrs".naturalisttimesheet as A
right outer join
"Naturalisthrs".naturalist_members as B
on a.nmember = b.abbrname
where "Status" = 'A'
group by "Fname", "Lname"
order by "Lname"
I believe I have a logic error but, have looked too long and can not find it.
thanks in advance.
I can not figure out what I am missing on the following select statement, where the output of the select statement with sums on the two hours fields. Would like to direct it to a table created by doing a select into with only 3 pieces of data for member. Then I can join with the members detail table to compile the information.
This works, but I have not been able to get just three pieces of data to write into another table.
select "nmember", sum(volhours) as Vol, sum(advtrnghrs) as ADV
from "Naturalisthrs".naturalisttimesheet group by nmember
When I tried doing the same idea in this query, I get names but no sums for each member.
select "Lname", "Fname", sum(volhours) as Vol, sum(advtrnghrs) as ADV
from "Naturalisthrs".naturalisttimesheet as A
right outer join
"Naturalisthrs".naturalist_members as B
on a.nmember = b.abbrname
where "Status" = 'A'
group by "Fname", "Lname"
order by "Lname"
I believe I have a logic error but, have looked too long and can not find it.
thanks in advance.