I am using CheckListEdit
component at Delphi which enables to select more than one item at time. When extracted using CheckListEdit1.Text, I get selected items in the String format like [item1, item2, item3]
which I trimmed further to discard first and last character to get final string as 'item1, item2, item3'.
My code is as follows
glist := CheckListEdit1.Text;
glistindex := Length(glist);
Delete(glist,glistindex,1);
Delete(glist,1,1);
//Here I am getting glist = 'item1, item2, item3..' etc..
Now I want to select from data from table where group like item1, item2, item3 etc..
My SQL Query is as follows
UniTable1.SQL.Text := Select * from emp where group like (:grp);
UniTable1.Params.ParamByName('grp').Value := glist;
But above SQL is returning error as 'like item1, item2, item3' is not a proper format is there any alterante way to create SQL query so that it will return data from selected group at CheckListEdit ?