How to Use Variables in Access SQL Queries -


Hi, I am working on a project for which I am using a large number of columns in my access SQL queries . A specific query includes many fields, such as the following fields:

  SELECT ([Score1] + [Score2] + [Score3]) * 5 AS [Score], [subject] FROM [ScoresTable] Where ([Score1] + [Score2] + [Score3]) * 5. & Gt; 500  

Is there a way to assign value to ([Score 1] + [Score2] + [Score3]) .5 to a variable So I write something in effect:

  SELECT ([Score1] + [Score2] + [Score3]) * 5s [score] * = VAR *, [subject] from [scalable] WHERE * VAR * & gt; 500  

If this is possible, can you show me how to get such results?

Thank you.

  SELECT Sq.Scores, select from sq.sebject (score 1 + score 2 + Score 3) * 5s score, subject to scorched) SS class WHERE sq.Scores & gt; 500;  

If the score can be 1, score 2, or score 3, then you might want to use the NJ function for zero instead of zero.


Comments