I have some values/ids coming from external sources like logs that needs to be sanitized/type casted before use. So e.g. if I have values like this:
800, 776, 7803, 827, 91, 976, 908
I want to be able to perform some operation on each value in mysql. I was hoping to be able to do something like this:
Select myCol*10
FROM (SELECT (800, 776, 7803, 827, 91, 976, 908) as myCol from dual);
but it fails with an error
ERROR 1241 (21000): Operand should contain 1 column(s).
The closest query I could find that allowed selecting multiple rows was this. But that would require prefixing each value with UNION ALL SELECT
e.g.
SELECT 1, 2, 3
UNION ALL SELECT 4, 5, 6
UNION ALL SELECT 7, 8, 9
Another option that could work is in memory table or even something like this. But those seems like overkill for something seemingly so simple.