Sorry for the ambiguous title. Not sure how to succinctly summarize this.
I have a database of 6000+ orders. The orders contain various items. I want to make a selection of orders that only contain onions.
So let’s say my onion item numbers are
Onions = "7490,7500,7517"
The items on each order are stored as a ¶ and tab delimited array in a field called OriginalOrder. Contents of four sample orders in the OriginalOrder field are
1) 7625–B 1 9.00 $9.00 2 Apple
2) 7628–B 1 9.00 $9.00 2 Cantaloupe
1) 7490–B 1 15.00 $15.00 2 Red Onion
2) 7625–A 1 9.00 $9.00 2 Apple
1) 7490–B 1 15.00 $15.00 2 Red Onion
2) 7500–B 1 15.00 $15.00 2 White Onion
1) 7517–A 1 15.00 $15.00 2 Yellow Onion
2) 7517–C 1 22.00 $22.00 5 Yellow Onion
I want my selection to contain orders 3 and 4, and not orders 1 and 2. Is there a slick way to do this that doesn’t involve looping through 6000 records? Thanks.