将第1学期的成绩推入第3学期的字段中,以供加入年中的新生 [英] Pushing term 1 results into term 3 fields for new students joining mid-year

查看:73
本文介绍了将第1学期的成绩推入第3学期的字段中,以供加入年中的新生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表,其中包含来自不同术语的测试标记, ca1_percent sa1_percent ca2_percent sa2_percent 。这4个字段位于 Results 表中,该表包含不同术语的结果。

I have a table that contains test marks from different terms, ca1_percent, sa1_percent, ca2_percent and sa2_percent. These 4 fields reside in the Results table that contains results from the different terms.

我使用自相关链接使用匹配字段 overall_percent_match ,该字段是使用计算的年& &主题与& _kf_studentID 。这种关系使我可以获得过去(一年)的测试结果。例如,我的第3学期的结果将包含第1学期和第2学期的(每个主题)的结果。除非今年中途有新学生加入,否则一切都很好。如果他参加第3学期,那么他的ca2结果(在第3学期完成)将像之前的其他记录一样进入他的 ca1_percent 列(应该包含第1学期的结果) 。

I used a self-relationship linking using the matched field overall_percent_match which is calculated using year & " " & subject & " " & _kf_studentID. This relationship allows me to obtain the test results from past terms (of a year). For example, my term 3 results will contain results from term 1 and term 2 (of each subject). All works fine unless there is a new student who joins mid way of the year. If he joins in term 3, his ca2 results (done in term 3) will fall into his ca1_percent column (which is supposed to contain term 1 results) like other records before him.

图片显示了我的意思。

我不知道解决方案。有人可以帮我吗?

I could not figure out the solution. Can anyone help me?

StackOverflow 链接包含与该问题有关的我的工作的更多详细信息。

This StackOverflow link contains more details of my work that was done related to this problem.

推荐答案

潜在的问题根据您的先前查询,是您正在通过以下方式获取值:

The underlying problem, per your prior query, is that you're pulling the values through:

GetNthRecord(SA1_Results_Match::mark_percent,2)

此语句假定存在N = 1,N = 2和N = 3。为使此工作正常进行,您可以执行以下任一操作:

This statement assumes the existence of an N=1, N=2 and N=3. To make this work properly you could do any of the following:


  1. 确保结果表始终包含上一学期的记录,即使学生在学期末加入。您可以继续以这种方式使用GetNthRecord,但始终需要确保记录井井有条。

  2. 使用ExecuteSQL语句仅为正确的摘要字段收集正确的学期结果。

  3. 进行四个单独的关系(具有单独的表出现),分别定义ca1,sa1,ca2和sa2。这看起来像是您在上一个问题中开始尝试做的事情。

这篇关于将第1学期的成绩推入第3学期的字段中,以供加入年中的新生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆