don wish <don_u_w...@yahoo.com> wrote:
> Thus, if the "Subject" column does not contain the string "last", I
> want to replace the "Value" with an integer, say "5".
> 
> Also, if the "Subject" column contains the string "current", I want
> to replace the "Value" witn an integer, say "3".

What should happen in the (presumably quite likely) case where both conditions 
are true - Subject does not contain 'last' but does contain 'current'?

Assuming you meant the first condition to read "Subject contains 'last' ", you 
want something like this:

update m set Value = case
    when Subject like '%last%' then 5
    when Subject like '%current%' then 3
    else Value end;

-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to