Hi Guys, I'm new on this group, and I have a question, is there a way to do a "sum if" (kind of)?What i want to do is the following.Select customers.custid, if (sales.itemname = 'candy', sum(sales.count)) as "Sales candies", if (sales.itemname = 'some', sum(sales.count)) as "Sales Some"from ...join ...where .....group by customers.custid ...Thanks in advanced, and best regards,Daniel Hernndez.Tijuana, BC, Mxico."More you learn, more you earn".
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!