如何实现两表间的计算查询?
在ACCESS两个表中:exscore score
查询平时成绩(generalsco) 、期末成绩(generalsco)、总成绩(ensco)
平时成绩=avg(exscore.exscore)
总成绩=(平时成绩*30%)+(期末成绩*70%)
如果像下面这样写那里出错了?高手们有什么更好的建议?
txtsql = "select score.csname,avg(exscore.exscore)as generalsco,score.ordinarysco,((generalsco*30%)+(ordinarysco*70%)) as endsco from from score,exscore where score.stuid=exscore.stuid and stuid='" & Trim(Text1(0)) & "'group by exscore.courseid,score.stuid"