Reputation: 203
I want to fill a ComboBox
from database but I want two conditions of same column
table column Group
contain four different values (rawmaterial
, formula
, packing
, Chemical
).
I want to select item names of group formula and packing
I am using the following query, but it's not working:
Select itemName from rawMaterial where Group = 'rawmaterial' , 'Packing'
Upvotes: 0
Views: 318
Reputation: 18737
Two alternatives:
Using OR
:
Select itemName from rawMaterial where Group = 'rawmaterial' OR Group= 'Packing'
Using IN
:
Select itemName from rawMaterial where Group IN ('rawmaterial' , 'Packing')
Upvotes: 2