Brian,
Can you be a bit more specific? You have the case expression which allows you to 
return values depending on other values
http://www.sqlite.org/lang.html#expr

something like  case Col1 when 1 then 'happy' when 2 then 'sad' so this could be 
wrapped up like

update table1 set col2 = case Col1 when 1 then 'happy' when 2 then 'sad' else 'who 
knows' end where Col3 = 'What she thinking' 

hope this help (oh you might want to check the syntax of the case expression )

Greg O
  ----- Original Message ----- 
  From: Brian Pugh 
  To: SQLite Email 
  Sent: Friday, February 20, 2004 7:42 AM
  Subject: [sqlite] Changing a Field


  Hi,

  I need to do a multiple search and replace on the same field
  in my database. Can anyone suggest a suitable bit of code
  for this? I have over 100,000 records, so any automation is
  very welcome!

  Thanks for any suggestions,

  Brian Pugh

Reply via email to