7 Replies Latest reply: Aug 3, 2010 7:58 PM by Nimish Shah RSS

    Trying to use DUAL for ratings ranking.

    Henry Noh

      I have a series of clients and and they are rated as big/med/small.

      Some clients are in the data multiple times with different ratings. For example, Company A can be rated 'big' in one entry, and 'small' in another entry.

      In the case of multiple ratings, I want the field to return the highest rating so Company B which is listed as both 'med' and 'small' will return only 'med'.

      To accomplish this, I'm thinking of using the dual function to convert 'big', 'med', 'small' into numbers (i.e. 1,2,3) so I can use an "if then max" function.

      Can someone show me the syntax in order to accomplish this or if there is a better way doing this?

       

      Thanks in advance!