Link to home
Start Free TrialLog in
Avatar of PHIL Sawyer
PHIL SawyerFlag for United Kingdom of Great Britain and Northern Ireland

asked on

want to select max number over 4 columns

Hello

I have a data set from my query as per the following
Company    Value1     Value2     Value3     Value4
A                    5                 2              0              0
B                    0                  12           0             45
C                    0                  0             0              0
D                   12                 1             88           4  etc etc

What I want is to include another column which gives me the max value in each row - or - just return the max value per row for each customer - eg
Company    Max
A                    5          
B                   45
C                    0      
D                   88

Regards
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PHIL Sawyer

ASKER

Didn't know greatest existed - Thanks
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

No problem.

Whenever you have a few minutes, it's always worth the time to just scan the SQL docs from time to time.

Just scanning the available functions can make you click on them to see what they do.  You will learn a lot...
Thanks