在Access中合并数据 [英] Merging Data in Access

查看:87
本文介绍了在Access中合并数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在访问中有多个表。我希望能够将所有表组合成一个大表。假设我有一个有姓氏,名字,信用卡信息的表,然后是另一个有姓氏,名字,电话号码的表。我希望能够合并2但是因为我有信用卡信息并不意味着我有电话号码,反之亦然。因此我无法创建简单的查询。我想要一个结合两者的列表,如果该人没有信用卡信息,那么就把它留空或者没有电话号码。


希望这是有意义的。谢谢!

I have multiple tables in access. I want to be able to combine all the tables into one large table. Let''s say I have one table that has last name, first name, credit card information then another table that has last name, first name, telephone number. I want to be able to merge the 2 however just because I have the credit card information doesn''t mean I have the telephone number and vice versa. Therefore I cannot create a simple query. I want one list that combines both and if there is no credit card information for that person then just leave it blank or the same it there is no telephone number.

Hope that makes sense. Thanks!

推荐答案

这个问题很有意义。不幸的是,我非常怀疑你的数据结构是否也是如此。请查看规范化和表格结构。我相信你,就像你之前的许多人(包括我自己)一样,会从中找到非常宝贵的理解。


就问题的直接回应而言,不同表可以通过常见的唯一引用链接。通常,除非有充分的理由不这样做,否则与单个对象类型相关的所有数据都将保存在单个存储(表)中。
The question makes sense. Unfortunately I very much doubt the same can be said of your data structure. Please check out Normalisation and Table structures. I''m sure you, like many before you (myself included), will find the understanding from that quite invaluable.

As far as a direct response to the question is concerned, disparate tables can be linked via common unique references. Typically though, unless there are good reasons not to, all data relating to a single object type would be held in a single store (table).


感谢您的回复。不幸的是,有一个很好的理由为什么它不是全部都放在一个表中,但我的目标是将它全部放在一个表中,而不必复制和粘贴。哦,非常感谢你的帮助。
Thanks for the reply. Unfortunately there is a good reason why it does not all come in one table but my goal was to put it all in one table without having to copy and paste. Oh well thanks for your help.


Sam,


你有一个与这些表相关的ID吗?如果这样做,您可以外部加入这些表格通过该ID,一个效率较低且推荐较少的方式是加入名字和姓氏(因为不同的人可以使用相同的名字和姓氏)。


告诉我如果您有任何疑问,

-AJ
Sam,

Do you have an ID that relates these tables together? If you do, you could outer join these tables together by that ID, a less efficient and less recommended way would be to join on first and last name (because different people can have the same first and last name).

Let me know if you have any questions,
-AJ


这篇关于在Access中合并数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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