需要帮助邮件列表查询 [英] Need help for mailing list query

查看:107
本文介绍了需要帮助邮件列表查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家,

我有两张桌子 - 联系和组织。两个表都有邮寄地址。联系表中的某些联系人不属于任何组织,因此我将链接指向那些作为个人的链接,这是组织在组织中的表格。

有某些组织不在列出任何联系人。这两个表链接为Org..as master和contact as slave。

我想创建一个邮件列表。标准将是

包含联系人姓名,组织名称,邮寄地址

其中

如果联系人是个人,则应仅包括联系人姓名&地址 - 不应该将个人显示为组织名称

如果联系人属于某个组织,那么组织应该在那里,

如果没有与org关联的联系人那么org ..名字和地址应该显示,


一切都将基于两个表格中的ysnMail复选框选项。


感谢您帮助解决所有这些问题out。

raz

Hi Experts,
I have two tables- contact and organization. Both tables have the mailing addresses. Some contacts in contact table don''t belong to any org so I give the link to those as individual which is an entry as organization in Org.. table.
There are certain organization which don''t have any contact person listed. These two tables are linked as Org..as master and contact as slave.
I want to create a mailing list.Criteria would be
To include Contact Name, Organization name, Mailing address
where
if contact is an individual, it should include only contact''s name & address - should not show individual as org name
if contact belongs to an organization then org...should be there,
if no contact associated with org then org.. name & address should show,

Everything will be based on ysnMail check box option which is in both tables.

Thanks for help to figure all this out.
raz

推荐答案

如果您提供所需信息,这应该很容易理清。

让我们从两个表的元数据开始。我可能还需要重新考虑存储在哪里(以及如何)存储的相当简单的解释,但是当我知道我是否可以理解它之前,我将再次使用元数据。


如果你能以我在我的例子中使用的相同方式发布表的元数据(关于布局/结构的信息),这将更好。单击回复按钮,您将可以访问我使用过的所有代码。
This should be easy enough to sort out if you provide the information required.

Let''s start with meta-data for both tables. I may also need to revisit the rather garbled explanation of what is stored where (and how) but I''ll have another look through it again when I have the meta-data handy before I will know if I can make sense of it.

This will work much better if you can post the meta-data (info about the layout / structure) of the table in the same way as I use in my example. Click on the Reply button and you will have access to all the codes I''ve used.
展开 | 选择 | Wrap | 行号


Hi NeoPa,

根据你的指示,我发布了两个表的MetaData。非常感谢你的帮助。


注意:tblOrg在tblContact上有一对多的关系

表:[tblOrg]


" intOrgID",number,PK"

" coop_yn",ysnCheckbox

" Active / Inactive",ysnCheckbox

" strOrgName",text

" strAddr1" text

" strAddr2",text

" strCity",text

" strProv",text

" strPC",text

" strCountry",text

" ysnMailAddrSame",ysnCheckbox

" strMailAddr1",text

" strMailAddr2",text

" strMailCity",text

" strMailProv",text

" strMailPC",text

" strMailCountry",text

" strOrgPhone",text

" strOrgEMail",text

" Mail / Don't Mail",ysnCheckbox

" Email /别 邮件",ysnCheckBox





表:[tblContact]


" LastUpdated",Date

" intOrgIDNum",number,FK

" Active / Inactive",ysncheckbox

" ; intContactID",number,PK

" strTitle",text

" strGender",text

" strFName",text

" strMName",text

" strLName",text

" strConPhone1",text

" ; strConPhone2",text

" strConFax",text

" strConEMail",text

" strWrkPhone",text
" strExt",text

" strWrkEmail",text

" strWorkFax",text

" strCurrentEmployer" ;,文本

" PreviousEmplyr",文字

" HomeAdd1",文字

" HomeAdd2",文字

城市,文字

" Prov,text

" PCode",text

" Country,text

" strRegion",text

" strGeographicArea",text

" strRiding_Name",text

" strRiding",text

" Mail_Don' 't Mail',ysnCheckbox

" Email_Don''t Email",ysnCheckbox



两个表都是相关的,我们需要结果作为联系人姓名:名字&姓氏在一起(如果没有联系人姓名的组织,那么组织的名称将显示而不是联系人姓名),那么组织名称(如果联系人在表格组织中与个人相关联,那么单词个人不应该如果联系人链接到个人以外的组织,则来自表tblOrg的
邮寄地址,否则来自表tblContact的邮寄地址(即,如果组织名称是个人)。 )。
Hi NeoPa,
As per your instruction I am posting MetaData of both tables. Thanks a lot for your help.

Note: tblOrg has One-To-Many relationship on tblContact
Table: [tblOrg]

"intOrgID",number,PK"
"coop_yn",ysnCheckbox
"Active/Inactive",ysnCheckbox
"strOrgName",text
"strAddr1"text
"strAddr2",text
"strCity",text
"strProv",text
"strPC",text
"strCountry",text
"ysnMailAddrSame",ysnCheckbox
"strMailAddr1",text
"strMailAddr2",text
"strMailCity",text
"strMailProv",text
"strMailPC",text
"strMailCountry",text
"strOrgPhone",text
"strOrgEMail",text
"Mail/Don''t Mail",ysnCheckbox
"Email/Don''t mail",ysnCheckBox






Table: [tblContact]

"LastUpdated", Date
"intOrgIDNum",number,FK
"Active/Inactive",ysncheckbox
"intContactID",number,PK
"strTitle",text
"strGender",text
"strFName",text
"strMName",text
"strLName",text
"strConPhone1",text
"strConPhone2",text
"strConFax",text
"strConEMail",text
"strWrkPhone",text
"strExt",text
"strWrkEmail",text
"strWorkFax",text
"strCurrentEmployer",text
"PreviousEmplyr",text
"HomeAdd1",text
"HomeAdd2",text
"City",text
"Prov",text
"PCode",text
"Country",text
"strRegion",text
"strGeographicArea",text
"strRiding_Name",text
"strRiding",text
"Mail_Don''t Mail",ysnCheckbox
"Email_Don''t Email",ysnCheckbox



Both tables are related and we need the results as contact Name:First Name & Last Name together ( If an organization without a contact name then name of the Organization would show instead of contact name), then Organization name ( if a contact person is associated as "Individual" in table organization then word " Individual" should not show for mailing list),
mailing address from table tblOrg if a contact is linked to an organization other than "Individual", otherwise mailing address from table tblContact (i.e if Org name is "Individual").


所以,我要求的格式是:
So, in the format I requested it would be :
< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号


这篇关于需要帮助邮件列表查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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