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!

Combining similar items into one amongst many items

Status
Not open for further replies.

SWTpaul

Technical User
Nov 11, 2003
27
US
I have a few products amongst about 1,000 that have extensions to the item #, such as DF and SP. Is there a way to find those items that have multiple item #'s and combine their data?

Such as...

MICROWAVE 4400924 $1,920.25
MICROWAVE 4400924DF $1,195.13
MICROWAVE 4400924SP $1,241.29

would combine into...

MICROWAVE 4400924 $4,356.67

Item #'s range from 3 digits up to 9.

Any help would be appreciated! Thanks!
 
What about something like this ?
SELECT ProductName, Val([Item #]) As ItemNum, SUM(Price) As TotalPrice
FROM yourTable
GROUP BY ProductName, Val([Item #])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top