Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASSISTANCE PLEASE ! - Using MS QUERY SUM() w/ CENTURA

Status
Not open for further replies.

jontywalker

Programmer
Apr 17, 2003
1
CA
I'm trying to run an MSQUERY 'SELECT' on our payroll database. I need to use both the SUM() and the GROUP BY functions within my QUERY on the CENTURA SQL dataset.

I've run headfirst into the "01002 - EDT NGC Not a GROUP BY column". I've looked up the error, but the recommended solution doesn't help me much.

I'm trying to "GROUP" based on an employee number and the payweek number (both numeric).

ANY SUGGESTIONS? This is URGENT !
 
Are you using the columns that you are grouping by in your selection query? The query should like this:

Select EmpNum, PayWeek, sum(PayrollAmt) From PayrollTable
Where ...
Group by EmpNum, PayWeek;

What is in the group-by clause should match the selection columns (other than the aggregate fns like sum() ).

This query will give you the amount paid per week per employee. Is that what you need?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top