Sabotage1945
Registered User.
- Local time
- Today, 16:40
- Joined
- Sep 30, 2004
- Messages
- 17
Hi everyone! I'm new to SQL and Access, and I would like to ask your help:
I've been asked to create some way (SQL script with formula) for me to use in order to 'read' and 'place' an equivalant numerical number to an alphabetical list. Here is an example:
I'm creating a student report list. The students have marks listed as 'A+', 'A', 'A-', 'B+', 'B', etc. I would like a quick an easy way of converting these in a NEW column in a numeric format. ie: 'A+' = '10' and down to 'F' = '0'
At present I'm having to do a find and replace in Excel - but on large files this takes too long. Can someone recomend a good way to do this?
Here is something I've tried in Excel that has worked - to a point, but the results are sometimes not what I want. I'm guessing there is a way to incorporate this into an ACCESS SQL:
=IF(E3="","",VLOOKUP(E3,{"A+",10;"A",9;"A-",8;"B+",7;"B",6;"C+",5;"C",4;"D+",3;"D+",2;"E",1;"F",0;"INC",0;"ABS",0},2))
Version 2:
=LOOKUP(E2,{"A+","A","A-","B+","B","C+","C","D+","D","E","F","INC","ABS"},{"10","9","8","7","6","5","4","3","2","1","0","0","0"})
Both have the same result in Excel where E2 has "A+", but the result is incorectly listed as "8".
Is there a better way to do a similar query in Access?
Thank you!
Sab.
I've been asked to create some way (SQL script with formula) for me to use in order to 'read' and 'place' an equivalant numerical number to an alphabetical list. Here is an example:
I'm creating a student report list. The students have marks listed as 'A+', 'A', 'A-', 'B+', 'B', etc. I would like a quick an easy way of converting these in a NEW column in a numeric format. ie: 'A+' = '10' and down to 'F' = '0'
At present I'm having to do a find and replace in Excel - but on large files this takes too long. Can someone recomend a good way to do this?
Here is something I've tried in Excel that has worked - to a point, but the results are sometimes not what I want. I'm guessing there is a way to incorporate this into an ACCESS SQL:
=IF(E3="","",VLOOKUP(E3,{"A+",10;"A",9;"A-",8;"B+",7;"B",6;"C+",5;"C",4;"D+",3;"D+",2;"E",1;"F",0;"INC",0;"ABS",0},2))
Version 2:
=LOOKUP(E2,{"A+","A","A-","B+","B","C+","C","D+","D","E","F","INC","ABS"},{"10","9","8","7","6","5","4","3","2","1","0","0","0"})
Both have the same result in Excel where E2 has "A+", but the result is incorectly listed as "8".
Is there a better way to do a similar query in Access?
Thank you!
Sab.