On Apr 9, 2012, at 10:43 AM, YAN HONG YE wrote:
> my sqlite database "db" have a column remarks text default "2012", I want to
> add string "high" to the string of remark as "2012high" when the score >80
>
> and add string "middle" to the string of remark as "2012middle" when the
> score>60 and score <80
>
> update the db.remarks value strcat(remark,"high") where db.score>80
update foo
set remark =
case
when score > 80 then remark || 'high'
when score between 60 and 80 then remark || 'middle'
else remark
end
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users