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

Date Query 1

Status
Not open for further replies.

Beowulf005

Technical User
Apr 5, 2005
640
Having some issues getting this to work.

Table
Column --Type
Column --Ticket
Column --Value

Trying to create a query that will take duplicate tickets merge them into one row while adding the value.
IE
Type Ticket Value
A 100 3
A 100 2
A 200 6

Results
Type Ticket Value
A 100 5
A 200 6

Thanks for you help

When frustrated remember, in the computer world there is almost always a backdoor.
 
SELECT Type, Ticket, SUM(Value) AS SumOfValue
FROM yourTable
GROUP BY Type, Ticket

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top