cirollo Active Member Licensed User Longtime User Dec 29, 2011 #1 I'm wondering if is possible to use the "like" operator in a SQL query For example, if I need only the records that start with given word,.... in sql should be (if i remember right): select * from mytable where myfield like "sta".... results: STAr, STAtement, STAring,..... and in case "abc" is inside the record??? in sql I use %sta or %sta% results: popSTAr, gangSTA, rockSTAr,...... this should be done in b4android????
I'm wondering if is possible to use the "like" operator in a SQL query For example, if I need only the records that start with given word,.... in sql should be (if i remember right): select * from mytable where myfield like "sta".... results: STAr, STAtement, STAring,..... and in case "abc" is inside the record??? in sql I use %sta or %sta% results: popSTAr, gangSTA, rockSTAr,...... this should be done in b4android????
H henry1311 Member Licensed User Longtime User Dec 29, 2011 #2 yes... ... field_name LIKE 'STA%' ... field_name LIKE '%STA' ... field_name LIKE '%STA%' The library also works with SQL b4android Attention to single or double quote! ciao enrico Last edited: Dec 29, 2011 Upvote 0
yes... ... field_name LIKE 'STA%' ... field_name LIKE '%STA' ... field_name LIKE '%STA%' The library also works with SQL b4android Attention to single or double quote! ciao enrico