title: E/SQLiteLog: (1) unrecognized token: "'%S-" in "select * from tb_inventory where SKU like '%S-"
body: <p>I created an inventory management application using SQLite. I get an error like this:</p>
  <blockquote>
  <p>E/SQLiteLog: (1) unrecognized token: &quot;'%S-&quot; in &quot;select * from
  tb_inventory where SKU like '%S-&quot;</p>
  </blockquote>
  <p>This error occurs if the string I entered has a special character. how to handle it?</p>
  <pre><code>String productcodewithoutspace = productcode.trim(); SQLiteDatabase db = myDB.getReadableDatabase();
                  String query =&quot;select * from tb_inventory where SKU like '%&quot;+ productcodewithoutspace +&quot;%'&quot;;
                  cursor = db.rawQuery(query, null);
                  cursor.moveToFirst();
                  if(cursor.getCount() &gt; 0) {
                      skuTextView.setText(cursor.getString(1).toString());
                      productNameTextView.setText(cursor.getString(2).toString());
                  } else {
                      Toast.makeText(PriceChecker.this, &quot;Data Not Found&quot;, Toast.LENGTH_SHORT).show();
                  }
                  cursor.close();
  </code></pre>