Can you use the value returned by a select as the "value as column" syntax ?
Example
Code: Select all
value1 | unit1 | value2 | unit2 | value3 | unit3 | value4 | unit4
-------+-------+--------+-------+--------+-------+--------+-------+
0 | GB | 1 | MB | 0 | kB | 57 | BytesCode: Select all
GB | MB | kB | Bytes
-------+-------+-------+-------+
0 | 1 | 0 | 57I know I could process each of the columns using php but would prefer to try and simplify it within the db.
I am using POSTGRES.