The statement is the following:
UPDATE mytable SET displayed_value=(close_time_2 || '-' || open_time_2)
WHERE close_time_2 != ""
Now I call it with mDb.execSQL
. How to execute the same with mDb.update
? (need to see how many records were updated)
Update: just to give an example. Here is my database before update:
item close_time_2 open_time_2 displayed_value
1 02:40 04:50
2 02:15 02:45
3 05:15
here is what I should get after update
item close_time_2 open_time_2 displayed_value
1 02:40 04:50 开发者_Go百科 02:40-04:50
2 02:15 02:45 02:15-02:45
3 05:15
It's really not that hard to find out how to use the update
-method. See the Docs and this Sample-code.
精彩评论