Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 22nd, 2016, 12:30 PM
Nathan Nathan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2009
Posts: 4 Nathan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 30 m 14 sec
Reputation Power: 0
Nested If statment

Hello!

I am having trouble trying to figure out a nested statement.

I have a set of file numbers... and a set of ratings.

There are multiple possibilities for the ratings. The problem is that they are alpha numeric ratings, and I need to identify the highest rating.


So examples would be A1, E3, S5, UU. Where S5 would be the highest rating (followed by E3, then A1) and UU is essentially no rating available.

Is there a way that I can sort out an if statement that says for those files that have a UU rating, if there are additional ratings it would find the highest?

edit

I did some more searching.... and put this

IIf([table].[field]="Rating Level 5","Rating Level 5",IIf([table].[field]="Rating Level 4","Rating Level 4",IIf([table].[field]="Rating Level 3","Rating Level 3",IIf([table].[field]="Unrated","Unrated")))


The results seem to populate every rating available rather than stopping at the highest rating available... which means there is something wrong with my equation lol

Is the order backwards?

Reply With Quote
  #2  
Old May 26th, 2016, 06:50 PM
informer informer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2016
Posts: 10 informer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 33 m 52 sec
Reputation Power: 0
Hi Nathan

I propose you this solution : create a mapping table between rate label and rate weight. It's possible because you know how to sort the rate labels according to a weight

For Example table tblRateMapping with 2 fields (RateLabel, RateWeight)

Then for your further treatments,you'll use this table by adding a INNER JOIN command in your SQL statement and order by RateWeight

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Nested If statment


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap