According to the previous post, I tried and I got the following solution to print the query string in the log.
Use the buildQueryString SQLiteQueryBuilder method. It takes almost the same parameters as the query() method takes .........
String sqlQry = SQLiteQueryBuilder.buildQueryString(false,TABLE_NAME, null, COLUMN_NAME_PATIENTID +"="+ patientID, null, null, COLUMN_NAME_PATIENTFIRSTNAME, null); Log.i(TAG, sqlQry); cursor = db.query(TABLE_NAME, null, COLUMN_NAME_PATIENTID +"="+ patientID, null, null, null, COLUMN_NAME_PATIENTFIRSTNAME);
Bagesh sharma
source share