I have a lot of columns with numbers in them in a SQL Server table. I need to check the specific columns for the highest number and output the name of the column for each row in the table.
For example:
RED | BLUE | GREEN | BLACK | Highest Column
0 2 1 4 BLACK <-- Outputted result of an expression
I have a dataset that pulls all the columns from the database table. I need an expression that will evaluate the data and return the highest valued column name.
I'm not sure of the logic behind this type of situation. Any help would be appreciated.
This is an SSRS report.