|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
sum up the fields value
hi,
I have a few fields in a table: ScoreA , ScoreB, ScoreC , TotalScore how to i sum up the number value in the Score A ,B and C and pass too TotalScore field ? Is it something like this ?? do until rs.EOF for each x in rs.fields totalScore = totalScore + x.value end if next rs.MoveNext loop |
|
#2
|
|||
|
|||
|
How about doing this in your SQL statement:
Code:
Select Sum(ScoreA) + Sum(ScoreB) + Sum(ScoreC) As TotalScore From tblScores Last edited by asmoran : February 15th, 2005 at 11:14 AM. Reason: forgot code tags |
|
#3
|
|||
|
|||
|
sql-statement
Update tblScores set totalscore=scorea+scoreb+scorec
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > sum up the fields value |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|