>DATE, HOURS, CODE, ACCOUNT
>1/1/99, 10, A, 123456
>1/2/99, 15, B, 789123
>1/3/99, 8, A, 123456
>1/4/99, 5, B, 951753
>
>TOTALS:
> 18, A, 123456
> 15, B, 789123
> 5, B, 951753
>
>How do I acheive to get the TOTALS: grouped as they are in the above example? To complicate it even futher the user selects a date range.
>For example 1/1/99 to 1/2/99 OR 1/1/99 to 1/4/99.
>
>Thanks in advance for any help.
>
>Sanjay
SELECT sum(hours), code, account FROM myTable GROUP BY account
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison