访问关系问题,数据未提取到正确的表中

战利品

我的数据库似乎无法正常工作。我一路上发现的其他事情(!)中,我无法像在CLASS表中的类一样在PAYMENT表中获得考试的付款值以显示在EXAM表中。

这是Access中的关系表。

我希望它在EXAM表中显示付款,但不是,仅显示诸如此类的PAYMENT表中的条目。

这是我想要的考试的“付款”表中的值

I am not able to get a full SQL of the actual database from Access as it doesn't allow it, but I can get some SQL from making a query with all the tables, but be aware that I cannot program any suggestions into the database, only I can change the relationships and join types in the visual Relationships screen: pastebin.com/RS6tT8C3

SELECT 
FROM (Parent INNER JOIN Student ON Parent.[Parent ID] = Student.[Parent ID]) INNER JOIN (([Exam Type] LEFT JOIN (Exam INNER JOIN [Exam Results] ON Exam.[Exam ID] = [Exam Results].[Exam ID]) ON [Exam Type].[Exam Type ID] = Exam.[Exam Type ID]) RIGHT JOIN (([Class Type] LEFT JOIN (Class INNER JOIN Attendance ON Class.[Class ID] = Attendance.[Class ID]) ON [Class Type].[Class Type ID] = Class.[Class Type ID]) RIGHT JOIN Payment ON Class.[Class ID] = Payment.[Class ID]) ON Exam.[Exam ID] = Payment.[Exam ID]) ON (Student.[Student ID] = Payment.[Student ID]) AND (Student.[Student ID] = [Exam Results].[Student ID]) AND (Student.[Student ID] = Attendance.[Student ID]);

An extremely helpful database manager suggested to me yesterday on IRC that I should do:

payments left join exams on examid = examid left join classes classid = classid

Which I believe I was able to do by changing the join type option in the relationships tab but it didn't seem to work. I have just done 1 module of database with no SQL programming so it's been a steep learning curve!

It's gotten to a stage that everything seems too complicated and I'm losing track of things lol If anyone could give me any advice in the next few hours as I have the assignment to hand in today then it would be very appreciated. Thanks!

**I will include the full database file also.

Kefash

First lets see if we are on the same page. It see as if you want to be able to see the Payments for exams when you select the sub datasheet. if so go to the exam table and switch to Design Mode then select Property Sheet Then change the field under Subdatasheet Name to the table you want. then match the [Exam ID] under Link Child Filds and Link Master Fields

enter image description here

PS. That's the ideal way to present data to users you should consider using forms for better control. Just a side note even though off topic its not a good practice to have spaces in your table names or table column headings.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

将 JSON 数据提取到关系表中

来自分类Dev

将更多对象提取到实体中后,核心数据关系丢失

来自分类Dev

在Android中访问数据库时出现问题,未创建表

来自分类Dev

无法以正确的格式将数据提取到Pandas数据框中

来自分类Dev

提取数据错误关系表

来自分类Dev

将Excel列中的字符串数据提取到hashmap中时出现问题

来自分类Dev

在Django框架中将数据从数据库中提取到表中

来自分类Dev

使用Selenium和Python将表数据提取到pandas数据框中

来自分类Dev

在Django框架中将数据从数据库中提取到表中

来自分类Dev

c# 将数据库提取到 SQL Server 数据表中

来自分类Dev

bash:将值提取到表中

来自分类Dev

将多个表提取到.csv中

来自分类Dev

将HTML表提取到R中

来自分类Dev

如何使用PostgreSQL和Ruby将数据库表中的列名提取到数组中?

来自分类Dev

使用API访问sqlalchemy中的关系表数据

来自分类Dev

将XML数据提取到MySQL中

来自分类Dev

从foreach将数据提取到数组中

来自分类Dev

从foreach中将数据提取到数组中

来自分类Dev

将数据表的内容提取到列表C#中

来自分类Dev

在php代码中将数据提取到表中时需要更改列名

来自分类Dev

我想将数据库元素数组提取到表中

来自分类Dev

如何使用AWK将多个XML的数据提取到表中

来自分类Dev

函数作为反应孩子无效?- 需要帮助将获取的数据提取到表中

来自分类Dev

如何将所有日期提取到选择数据表中

来自分类Dev

将数据从Microsoft Word提取到数据库表

来自分类Dev

从关系表中提取数据到 AppServiceProvider

来自分类Dev

MySQL中的数据透视表未正确返回

来自分类Dev

数据透视表中的计算列汇总未正确显示

来自分类Dev

表格未提交数据表中的正确值

Related 相关文章

  1. 1

    将 JSON 数据提取到关系表中

  2. 2

    将更多对象提取到实体中后,核心数据关系丢失

  3. 3

    在Android中访问数据库时出现问题,未创建表

  4. 4

    无法以正确的格式将数据提取到Pandas数据框中

  5. 5

    提取数据错误关系表

  6. 6

    将Excel列中的字符串数据提取到hashmap中时出现问题

  7. 7

    在Django框架中将数据从数据库中提取到表中

  8. 8

    使用Selenium和Python将表数据提取到pandas数据框中

  9. 9

    在Django框架中将数据从数据库中提取到表中

  10. 10

    c# 将数据库提取到 SQL Server 数据表中

  11. 11

    bash:将值提取到表中

  12. 12

    将多个表提取到.csv中

  13. 13

    将HTML表提取到R中

  14. 14

    如何使用PostgreSQL和Ruby将数据库表中的列名提取到数组中?

  15. 15

    使用API访问sqlalchemy中的关系表数据

  16. 16

    将XML数据提取到MySQL中

  17. 17

    从foreach将数据提取到数组中

  18. 18

    从foreach中将数据提取到数组中

  19. 19

    将数据表的内容提取到列表C#中

  20. 20

    在php代码中将数据提取到表中时需要更改列名

  21. 21

    我想将数据库元素数组提取到表中

  22. 22

    如何使用AWK将多个XML的数据提取到表中

  23. 23

    函数作为反应孩子无效?- 需要帮助将获取的数据提取到表中

  24. 24

    如何将所有日期提取到选择数据表中

  25. 25

    将数据从Microsoft Word提取到数据库表

  26. 26

    从关系表中提取数据到 AppServiceProvider

  27. 27

    MySQL中的数据透视表未正确返回

  28. 28

    数据透视表中的计算列汇总未正确显示

  29. 29

    表格未提交数据表中的正确值

热门标签

归档