How To Scale Database

By admin  

how to scale database
How do you compute the average of 4 tests in an access query?

I have to make this access database for my C.I.S. class and was doing good until it asks to compute the average of the four tests in a separate column. Then wants me to assign a letter grade in another column based on the following grading scale. : <55 = F,<65 = D,<75 = C,<85 = B, everything else = A.

These are the instructions exactally as my professor listed them:
5) Create a Query1:
Name the Query: Your initials+Q1.
Include the following fields: ClassID, ClassDescription, StudentName, Test1, Test2, Test3, Test4, Average of the 4 tests, Letter Grade for the average.
Grading Scale: <55 = F,<65 = D,<75 = C,<85 = B, everything else = A.

Please Help!!!

Try this one..

Select ClassID, ClassDescription,
StudentName, Test1, Test2,
Test3, Test4,
(Test1 + Test2 + Test3 + Test4) / 4 as Average,
IIF(
((Test1 + Test2 + Test3 + Test4) / 4) < 55,'F',
IIF(
((Test1 + Test2 + Test3 + Test4) / 4) < 65,'D',
IIF(
((Test1 + Test2 + Test3 + Test4) / 4) < 75,'D',
IIF(
((Test1 + Test2 + Test3 + Test4) / 4) < 85,'B',
'A'
)
)
)
) as LetterGrade
From TableName

hope this helps...:D

Automatic database integration with IBM WebSphere eXtreme Scale

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

Post a Comment

Your email is never shared. Required fields are marked *

*
*