My table has 3 text fields: open_time_2, close_time_2, displayed_value (sample values are ‘5:45’, ‘4:15’, ”).
Need to update displayed_value with text ‘4:15 – 5:45’.
If I use the following query:
UPDATE mytable SET displayed_value=(close_time_2 + '-' open_time_2)
WHERE close_time_2!=""
In result I am getting value ‘9.0’. What is wrong here?
You should use the SQLite concatenation operator,
||, rather than addition: