Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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:

My website
Posted

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.

Gamer extraordinaire. Programmer wannabe.
Posted

Wyrd......

 

U is on my Xmas card list:) I've been banging my head against a wall trying to suss this!!

 

Thank you indeedy:):):)

My website

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...