andrewEmbassy
Programmer
first post!
I'm a new MySQL user (currently working with ASP), and I'm really loving the flexibility it gives me, but I can't figure out how to do something that seems really simple to me-
I've got a column called itemShipping and a list of items that I want to sum- so I was thinking:
but this gives me itemShipping as equaling 0 (it should be like 150 or something).
A friend of mine is wondering if I need a GROUP BY clause in there- do I? Also, shouldn't I be able to find this info in the MySQL documentation? I found SUM() but I didn't find anything else about needing more than I've got...
Thanks!
I'm a new MySQL user (currently working with ASP), and I'm really loving the flexibility it gives me, but I can't figure out how to do something that seems really simple to me-
I've got a column called itemShipping and a list of items that I want to sum- so I was thinking:
Code:
SELECT SUM('itemShipping') totalShipping FROM itemTable WHERE itemId IN ('SP6','SM100','SM346')
but this gives me itemShipping as equaling 0 (it should be like 150 or something).
A friend of mine is wondering if I need a GROUP BY clause in there- do I? Also, shouldn't I be able to find this info in the MySQL documentation? I found SUM() but I didn't find anything else about needing more than I've got...
Thanks!