Alter a Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • topcan5
    New Member
    • Feb 2008
    • 1

    Alter a Query

    For example: I have one query that generate a table (student), with 3 columns (ID, Name, and Grade).

    ID Name Grade
    1 Amy 98
    2 Ben 85
    3 John 70

    I will like to do to another Select query on top of this query, which i can select ID, Name, and Grade. If the grade is over 90, i will like to save the grade as "good grade"; between 80 to 90 as "OK grade"; below 80 as "bad grade".

    So the second query will show like:
    ID Name Good Grade OK grade Bad Grade
    1 Amy 98 0 0
    2 Ben 0 85 0
    3 John 0 0 70

    Is it possible to do that?
    3
  • cori25
    New Member
    • Oct 2007
    • 83

    #2
    Hello...

    1.) In the query bring in ID, Name, Grade

    2.) Then you will need to create the following fields within this query:

    Good Grade:iif([Grade]>90, "Good", "")
    Criteria: Good

    Satisfactory Grade:iif([Grade]Between 80 And 90, "Satisfacto ry", "")
    Criteria: Satisfactory

    Bad Grade:iif([Grade]<80, "Poor", "")
    Criteria: Poor

    Put in the criteria so that under the Good Grade column only Good will pull in for that field and so on...

    Thanks

    Comment

    Working...