Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


sum hours fields into another table

sum hours fields into another table

sum hours fields into another table


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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close