You need to sign in to do that
Don't have an account?
Aman Bisht
Soql dynamic query every times returns null...need help
Soql dynamic query every times returns and showing exception....
System.QueryException: unexpected token: offset4
public static list<Idea> getData(String status , String item , String search, String off) { Integer offset = integer.valueOf(off); String srchstr = '%' + search + '%'; string query = 'SELECT Id, Title, Categories , Body,NumComments,CreatedBy.firstname, status, voteTotal from idea where communityid =: zoneId'; if(item !='All') { query +=' AND Categories =\'' +item+ '\''; } if(status !='All') { query +=' AND Status=\'' +status+'\'' ; } if(search != null) { query += ' AND Title like \'' +srchstr+ '\''; } query += 'Limit 2 offset' + offset; System.debug(query); return Database.query(query); }
System.QueryException: unexpected token: offset4
Thanks
Amit Chaudhary
thanks both of u
Let us know if you need more help on same topic.