mercredi 9 décembre 2015

How to use sub query in Android

I want to get the result of multiple where condition with multiple LIKE clause .I tried with this below query :

 select * from  ALL_Post where ActiveStatus = '1' AND Status = 'PENDING' AND inspectorName LIKE '%"+searchText+"%' OR REMARK  LIKE '%"+searchText+"%' OR HashTag LIKE '%"+searchText+"%' ORDER BY ActionDate DESC

But i want to get result when at least any of the the conditions is true with where ActiveStatus = '1' AND Status = 'PENDING' with LIKE clause with OR clause.

But query not return proper result.Can someone suggest how to write above proper query.

Aucun commentaire:

Enregistrer un commentaire