组合多个访问表中的数据以生成地址标签,优先选择邮政信箱而不是物理地址
我有一个 Access 2007 数据库,其中有 3 个表,每个表都相同。
这些表中的每一个都供不同的电话营销人员输入潜在客户。有必要有多个表,因为每个营销人员必须被视为一个单独的实体。
每个表都有以下与问题相关的字段:
POBoxNumber
郊区邮政信箱
邮政信箱城
POBox邮政编码
地址构建
地址街道
地址郊区
地址城市
AddressPostCode
现在我需要做的是创建一个标签打印查询,该查询将优先使用邮政信箱而不是物理地址,如果邮政信箱为空,它将使用物理地址。
然后我需要将其显示为
AddrLine1
地址线2
地址线3
地址线4
AddrLine5
即AddrLine1,如果填写了pobox,则为邮政信箱号码,否则为建筑物...等等。
到目前为止,我已经尝试过联合和条件选择,但没有成功!
我该怎么做?
I have an Access 2007 database that has 3 tables, each the same.
Each of these tables is for a different telemarketer to enter leads. It is necessary for there to be multiple tables as each marketer must be treated as a separate entity.
Each of these tables has the following fields relevant to the question:
POBoxNumber
POBoxSuburb
POBoxCity
POBoxPostCode
AddressBuilding
AddressStreet
AddressSuburb
AddressCity
AddressPostCode
Now what I need to do is create a query for label printing which will prefer the PO Box to the physical address, if the PO Box is empty it will use the physical.
I then need this to be displayed as
AddrLine1
AddrLine2
AddrLine3
AddrLine4
AddrLine5
ie AddrLine1 if pobox is filled will be the PO Box number, otherwise it will be the building... and so on.
I have tried Unions and Conditional selects so far but to no avail!
How do I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许:
如果这不是您想要的,请解释为什么不是,并提供一些示例数据。你的问题就目前而言有点模糊。
Perhaps:
If this is not what you want, please explain why it is not and provide some sample data. Your question is a little vague as it stands.