KEY_STRING is the text column name

When putting in KEY_STRING + " like " + mystring => I am getting a syntax 
exception
KEY_STRING + " like \"" + mystring + "\"" => it seems to incorrectly always 
find something

Actually, I want only exact matches, no substrings anyways
  ----- Original Message ----- 
  From: Kostya Vasilyev 
  To: [email protected] 
  Sent: Wednesday, January 12, 2011 4:51 PM
  Subject: Re: [android-developers] sqllite


  Try using "like":

  ... where column like "%substring%"...


  --
  Kostya Vasilyev -- http://kmansoft.wordpress.com

  13.01.2011 3:42 пользователь "Hendrik Greving" <[email protected]> 
написал:
  > I have a database with a primary integer row key and several columns. One 
of the columns is "text". Normally I am only fetching for the key, which is 
easy with SQLiteDataBase.query and KEY_ROWID = <mynumber> in the selection 
field. How can I check whether a row (or more) exist that contain a certain 
string in the text column. I've tried "MY_STRING_COLUMN = \"my_search_string\"" 
in the selection argument, but this doesn't work.
  > 
  > -- 
  > You received this message because you are subscribed to the Google
  > Groups "Android Developers" group.
  > To post to this group, send email to [email protected]
  > To unsubscribe from this group, send email to
  > [email protected]
  > For more options, visit this group at
  > http://groups.google.com/group/android-developers?hl=en


  -- 
  You received this message because you are subscribed to the Google
  Groups "Android Developers" group.
  To post to this group, send email to [email protected]
  To unsubscribe from this group, send email to
  [email protected]
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to