Example:
col1 col2 col3 col4 col5 col6
1 0 0 3 0 2
1 1 2 0 0 2
1 2 2 4 3 1
I want to be able to create a column that takes the highest value amonst all these fields on their respective row, something like:
" select highest(col1, col2, col3, col4, col5, col6) as highestValue "
Anything out there like that? Keep in mind I actually have 13 columns.
as functions don't allow optional arguments, I would create a function with 15 arguments, and pass in your example 2 null values at the end.
Open in new window