quagmire02 All American 44225 Posts user info edit post |
seems to me this should work, but i have exactly zero experience running access queries (of which "IIF" is unique to, i believe)...keeps telling them the syntax is wrong, and it might be something obvious, but i don't see it banana: IIf( IIf( IIf([apple]>[pear],[apple],[pear]) AS fruit1 > IIf([orange]>[kiwi],[orange],[kiwi]) AS fruit2 ,[fruit1],[fruit2] ) AS fruit3 > [peach],[fruit3],[peach] ) if it's not obvious, they're trying to compare 5 numbers to get the largest4/25/2012 3:25:38 PM |
disco_stu All American 7436 Posts user info edit post |
Is it the aliasing that's fucking you up?
You had to use banana: to designate the first IIF's alias, would you need to do the same with fruit1, fruit2, and fruit3? 4/25/2012 4:21:21 PM |