Hi again,
This time I’m looking for a way for my query to tell me which is the maximum value out of three fields in the query, in this instance its [LPV3mScore], [LPV10mScore] and [LPV30mScore]. For example. If
[LPV3mScore] = 0
[LPV10mScore] = 19
[LPV30mScore] = 0
Then I would like to return LPVMaxScore = 19
[LPV3mScore] = 79
[LPV10mScore] = 56
[LPV30mScore] = 43
Then I would like to return LPVMaxScore = 76
This is my SQL at present, I’ve tried using the maximum function in expression builder but its the bit highlighted in red thats giving me problems! Can anyone help?
Thanks in advance
Swifty
This time I’m looking for a way for my query to tell me which is the maximum value out of three fields in the query, in this instance its [LPV3mScore], [LPV10mScore] and [LPV30mScore]. For example. If
[LPV3mScore] = 0
[LPV10mScore] = 19
[LPV30mScore] = 0
Then I would like to return LPVMaxScore = 19
[LPV3mScore] = 79
[LPV10mScore] = 56
[LPV30mScore] = 43
Then I would like to return LPVMaxScore = 76
This is my SQL at present, I’ve tried using the maximum function in expression builder but its the bit highlighted in red thats giving me problems! Can anyone help?
Code:
SELECT Round([MaximumRut],0) AS MaxRut, RutScore([MaxRut]) AS RutScore, Round([TEX],1) AS Texture, TextureScore([Texture]) AS TextureScore, Round([WholeCwayCracking],2) AS Cracking, CrackingScore([Cracking]) AS CrackingScore, Round([LPV3m],1) AS 3mELPV, LPV3mScore([3mELPV]) AS LPV3mScore, Round([LPV10m],1) AS 10mELPV, LPV10mScore([10mELPV]) AS LPV10mScore, Round([LPV30m],0) AS 30mELPV, LPV30mScore([30mELPV]) AS LPV30mScore, [COLOR="Red"]Max([LPV3mScore] And [LPV10mScore] And [LPV30mScore]) AS LPVMaxScore[/COLOR]
FROM [TRACS Details];
Thanks in advance
Swifty