MySQL Forums
Forum List  »  Newbie

SELECT problem
Posted by: John Noble
Date: November 27, 2018 06:59AM

Hi folks,

I have a my Orders table as follows.

OrderNo, Product, Hold Back
1, Item 1, F
1, Item 2, F
1, Item 3, F
2, Item 1, F
2, Item 2, T
2, Item 3, F

I want to query the table so that I select only rows where all items in the order have Hold back set to F.

So using the data above I would only want data from Order #1 as Order 2 has a row that has Hold back set to T.

Can anyone advise ?

Options: ReplyQuote


Subject
Written By
Posted
SELECT problem
November 27, 2018 06:59AM
November 27, 2018 08:17AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.