I want to filtering data from SQL to my datagrid.
I have :
1 table (tableX)
3 Columns
Col1 Col2 Col3
1/x/10 BJB 1/20/20
1/y/10 BJB 1/20/30
1/x/10 BJB 1/20/30
1/y/10 BJB 1/20/20
2 datagrid (dg1, dg2)
i want insert :
dg1 with col1 "1/x/10" and col3 "10/20/20"
dg2 with col1 "1/y/10 and col3 "10/20/20
i can filter with only one Col3
"SELECT Col1, Col2, Col3 FROM Tablex WHERE Col3='10/20/20'"
how to filter col1 witch contain "x" or "y" and col3?
==========================================================================
O YEAH.. thanks for the answer.
this for dg1
("SELECT Col1, Col2, Col3 FROM TableX WHERE Col1 like ('%/X/%') AND Col3='10/20/20'")
and this for dg2, the different is just X and Y..lol
("SELECT Col1, Col2, Col3 FROM TableX WHERE Col1 like ('%/Y/%') AND Col3='10/20/20'")
SELECT Col1, Col2, Col3 FROM Tablex WHERE Col3='10/20/20' AND Col1 = '1/x/10'for one andSELECT Col1, Col2, Col3 FROM Tablex WHERE Col3='10/20/20' AND Col1 = '1/y/10'for the other.