hog Posted October 27, 2003 Posted October 27, 2003 In Access I have a query that groups customer and itemid. This query is then used in another query with a left join into the item table. The query returns a list of items that the customer has not already ordered. Question is how do I do this in code to use a dataadapter to populate a combobox. I'm trying to do this.... Select a customer, display only items they haven't ordered. Any ideas:confused: Quote My website
wyrd Posted October 27, 2003 Posted October 27, 2003 I'm not quite sure why you'd need a left join? You're just returning the list of items a user hasn't ordered right? SELECT item FROM ITEMS WHERE item_id NOT IN (SELECT item_id FROM CUSTOMER_ORDER WHERE customer_id=?) If this isn't what you are looking for, then can you please be more specific? ie; what are the table columns in your tables, how are they related, and maybe what query you're currently using to try and accomplish this. Quote Gamer extraordinaire. Programmer wannabe.
hog Posted October 27, 2003 Author Posted October 27, 2003 Wyrd...... U is on my Xmas card list:) I've been banging my head against a wall trying to suss this!! Thank you indeedy:):):) Quote My website
wyrd Posted October 27, 2003 Posted October 27, 2003 Heh.. np. :) Quote Gamer extraordinaire. Programmer wannabe.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.