Hi!
I would like to compute for the general average of a student who belong to a certain class section. The flow of query will look like
Is this possible?
I was trying to do it like this
I would like to compute for the general average of a student who belong to a certain class section. The flow of query will look like
VB.NET:
IF SectionName='Section1' THEN
update a table field GenAve using a formula
ELSEIF SectionName="Section2" THEN
update a table field GenAve using another formula
ElSE
update a table field GenAve using another formula
END IF
I was trying to do it like this
VB.NET:
If SectionName = 'Section1'
UPDATE tblgradek12 SET GenAve=((Speech * 1.2) +
(English * 1.5) +
(Math * 1.5) +
(Science * 1.8) +
(PE * 1.2))/7.2
SELECT DISTINCT IDNO,LastName,FirstName,MI,GENDER,
YEARLEVEL,SECTIONNAME,Adviser,[English],[Math],[Speech],
[PE],[Science],[Earth Science]
FROM tblGradeK12
ELSE
if SectionName = 'Section2'
UPDATE tblgradek12 SET GenAve=((Speech * 1.2) +
(English * 1.5) +
(Math * 1.5) +
(Science * 1.8) +
(PE * 1.2) +
([Earth Science] * 1))/8.2
SELECT DISTINCT IDNO,LastName,FirstName,MI,GENDER,
YEARLEVEL,SECTIONNAME,Adviser,[English],[Math],[Speech],
[PE],[Science],[Earth Science]
FROM tblGradeK12