randommetalguy
Registered User.
- Local time
- Today, 17:05
- Joined
- Nov 25, 2008
- Messages
- 52
Hey guys,
I have a query where I do a bunch of calculated values. For my next query I need to determine the higher of the two values in a row and then perform calculations on them.
I know how to do this in VB but I'm trying to let the SQL handle all of my calculations.
So. in my query called PulleyDiameterQ I have two fields
PulleyTension: FormatNumber(2*[InputWorkingTension]*1000/(2*[NumberOfCords]*[ASBasicQ.CordDiameterTrimmed]),0)
which currently returns 812
and
PulleyFilament: FormatNumber([ASCordQ.FilamentDiameter]*1000,0)
which currently returns 420
I can't use MAX() unless it's a column so is there any way to use PIVOT to turn this row into a column? Using SQL what's the best why to extract the higher of the two values from my PulleyDiameterQ?
I have a query where I do a bunch of calculated values. For my next query I need to determine the higher of the two values in a row and then perform calculations on them.
I know how to do this in VB but I'm trying to let the SQL handle all of my calculations.
So. in my query called PulleyDiameterQ I have two fields
PulleyTension: FormatNumber(2*[InputWorkingTension]*1000/(2*[NumberOfCords]*[ASBasicQ.CordDiameterTrimmed]),0)
which currently returns 812
and
PulleyFilament: FormatNumber([ASCordQ.FilamentDiameter]*1000,0)
which currently returns 420
I can't use MAX() unless it's a column so is there any way to use PIVOT to turn this row into a column? Using SQL what's the best why to extract the higher of the two values from my PulleyDiameterQ?