homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

need help in mysql query

Msg#: 4102101 posted 3:09 am on Mar 22, 2010 (gmt 0)

Hi all,
i have a table (sales) that contain cust_id, item_id and item_qty.
cust_id item_id item_qty
abc 100 100
abc 110 100
abc 120 100
abb 100 100
abb 120 100
abb 130 100
aba 110 100
aba 120 100
aba 130 100

how to make query that give result: customer abb (who not buy item 110)

Thanks for any help/ idea



WebmasterWorld Senior Member whoisgregg us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4102101 posted 4:59 pm on Mar 22, 2010 (gmt 0)

Welcome to WebmasterWorld, plusnplus!

Is this what you're looking for?

FROM `sales`
WHERE `cust_id` = 'abb'
AND `item_id` != '110'

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved