I have a table where message is a varchar column type.
mysql> select * from todel;
+---------+
| message |
+---------+
| 73, 116 |
+---------+
1 row in set (0.00 sec)
I am not able to convert the ASCII values to string.
mysql> select char(message) from todel;
+---------------+
| char(message) |
+---------------+
| I |
+---------------+
1 row in set, 1 warning (0.01 sec)
mysql> show warnings;
+---------+------+----------------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------------+
| Warning | 1292 | Truncated incorrect INTEGER value: '73, 116' |
+---------+------+----------------------------------------------+
1 row in set (0.00 sec)
If I use char function directly, then it works as expected:
mysql> select char(73, 116);
+---------------+
| char(73, 116) |
+---------------+
| It |
+---------------+
1 row in set (0.00 sec)
How do I use the "char" function while selecting varchar data from a table?