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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Question

Status
Not open for further replies.

serino

Programmer
Feb 13, 2003
112
US
Hi everyone,

I have query which pulls information from table that contains the following fields jobnumber, phase1, phase2, phase3 and phase4.

The query displays the information in the following way.

JobNumber Phase1 Phase3 Phase3 Phase4
302012 1
302012 2
302012 3
302012 4
304433 1
304433 2

Is there a way I can combine the jobnumber field to display only one row per jobnumber?

JobNumber Phase1 Phase3 Phase3 Phase4
302012 1 2 3 4
304433 1 2


Any suggestions?
 
A starting point (SQL code):
SELECT JobNumber, Sum(Phase1), Sum(Phase2), Sum(Phase3), Sum(Phase4)
FROM yourTable GROUP BY JobNumber

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank You PHV. Thats exactly what I needed to accomplish.

As always your great help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top