Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Sir, i have a student attendance column. in which student get attendance out of 10.

column look like :-

Att(10)
5
8
7

i need to convert this attendance out of 10 to out of 20 using sql query.
how can i do it
Posted
Updated 29-Aug-14 21:53pm
v2
Comments
Vinay Mistry 30-Aug-14 4:09am    
The same way you count out of 10

Try:
SQL
SELECT [Att(10)] * 2 AS [Att(20)] FROM MyTable
 
Share this answer
 
Suppose you have attendance out of 10. Now you want to convert it to out of X (Here is out of 20). Try following Query. Just replace X with any number whatever you want.
SQL
SELECT [Att(10)] * (X/10) AS [Att(X)] FROM MyTable.

Keep in mind that X is just place that you have to replace it in this query with anything that you want (ex. 20, 50, 100 etc). Above query is just rough representation. X must be replaced with a number.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900