帮助数据库解决方案 [英] Help With Database Solution
问题描述
我是非营利组织的志愿者,他们在多个数据库中有很多名字。问题是有些人在多个b
数据库中。如果他们从多个数据库发送邮件,那么人们会得到2个和3个相同的东西。我的想法是制作或找到一个
程序,每个人都是1个数据库,然后让人们成为
多个组的一部分。 (例如:bill是a组和b组的一部分,我正在邮寄
来自两个组我只想要一封邮件给他)。
它可以是一个单独的程序或访问。现在使用访问,但我不能
弄清楚如何让我的想法发挥作用。
如有问题请询问。
tia
Stephen
I volunteer for a non-for profit group and they have alot of names in a
multiple databases. the problem is that some people are in multiple
databases. and if they send out a mailing from multiple databases some
people get 2 and 3 of the same thing. my idea was to either make or find a
program that has everyone is 1 database and then make the people part of
multiple groups. (ex: bill is part of group a and b and im doing a mailing
from both group i only want 1 piece of mail to go to him).
It can be a separate program or with access. that use access now but i cant
figure out how to make my idea work.
any question please ask.
tia
Stephen
推荐答案
Stephen写道:
Stephen wrote:
我是非营利组织的志愿者,他们在多个数据库中有很多名字。问题是有些人在多个b
数据库中。如果他们从多个数据库发送邮件,那么人们会得到2个和3个相同的东西。我的想法是制作或找到一个
程序,每个人都是1个数据库,然后让人们成为
多个组的一部分。 (例如:bill是a组和b组的一部分,我正在邮寄
来自两个组我只想要一封邮件给他)。
它可以是一个单独的程序或访问。现在使用访问,但我不能
弄清楚如何让我的想法发挥作用。
如有问题请询问。
tia
Stephen
I volunteer for a non-for profit group and they have alot of names in a
multiple databases. the problem is that some people are in multiple
databases. and if they send out a mailing from multiple databases some
people get 2 and 3 of the same thing. my idea was to either make or find a
program that has everyone is 1 database and then make the people part of
multiple groups. (ex: bill is part of group a and b and im doing a mailing
from both group i only want 1 piece of mail to go to him).
It can be a separate program or with access. that use access now but i cant
figure out how to make my idea work.
any question please ask.
tia
Stephen
首先你应该只有一个数据库!!!
数据库应该有3个表:
联系人(contact_id,f_name,l_name,street1,street2,email1address等等)
groups(group_id,group_name ,group_description)
groups_contacts(group_id,contact_id)
您的查询将如下所示(未经测试)
SELECT DISTINCT(gc.contact_id),c。*
来自group_contacts AS gc
LEFT JOIN联系人c ON c.contact_id = gc.contact_id;
First off you should only have ONE database!!!
Within that database there should be 3 tables:
contacts(contact_id,f_name,l_name,street1,street2, email1address,etc,etc)
groups(group_id,group_name,group_description)
groups_contacts(group_id,contact_id)
Your query would then look like this (untested)
SELECT DISTINCT(gc.contact_id),c.*
FROM group_contacts AS gc
LEFT JOIN contacts c ON c.contact_id = gc.contact_id;
strawberry写道:
strawberry wrote:
Stephen写道:
Stephen wrote:
我是非营利组织的志愿者,他们在
多个数据库中有很多名字ASES。问题是有些人在多个b
数据库中。如果他们从多个数据库发送邮件,那么人们会得到2个和3个相同的东西。我的想法是制作或找到一个
程序,每个人都是1个数据库,然后让人们成为
多个组的一部分。 (例如:bill是a组和b组的一部分,我正在邮寄
来自两个组我只想要一封邮件给他)。
它可以是一个单独的程序或访问。现在使用访问,但我不能
弄清楚如何让我的想法发挥作用。
如有问题请询问。
tia
Stephen
I volunteer for a non-for profit group and they have alot of names in a
multiple databases. the problem is that some people are in multiple
databases. and if they send out a mailing from multiple databases some
people get 2 and 3 of the same thing. my idea was to either make or find a
program that has everyone is 1 database and then make the people part of
multiple groups. (ex: bill is part of group a and b and im doing a mailing
from both group i only want 1 piece of mail to go to him).
It can be a separate program or with access. that use access now but i cant
figure out how to make my idea work.
any question please ask.
tia
Stephen
首先你应该只有一个数据库!!!
数据库应该有3个表:
联系人(contact_id,f_name,l_name,street1,street2,email1address等等)
groups(group_id,group_name ,group_description)
groups_contacts(group_id,contact_id)
您的查询将如下所示(未经测试)
SELECT DISTINCT(gc.contact_id),c。*
FROM group_contacts AS gc
LEFT JOIN contacts c ON c.contact_id = gc.contact_id;
First off you should only have ONE database!!!
Within that database there should be 3 tables:
contacts(contact_id,f_name,l_name,street1,street2, email1address,etc,etc)
groups(group_id,group_name,group_description)
groups_contacts(group_id,contact_id)
Your query would then look like this (untested)
SELECT DISTINCT(gc.contact_id),c.*
FROM group_contacts AS gc
LEFT JOIN contacts c ON c.contact_id = gc.contact_id;
糟糕,该查询应该是这样的(再次未经测试):
SELECT DISTINCT(gc.contact_id),c 。*
来自group_contacts AS gc
LEFT JOIN联系人c ON c.contact_id = gc.contact_id
WHERE gc.group_id = 1
OR gc.group_id = 2;
Oops, that query should be like this (again untested):
SELECT DISTINCT(gc.contact_id),c.*
FROM group_contacts AS gc
LEFT JOIN contacts c ON c.contact_id = gc.contact_id
WHERE gc.group_id = 1
OR gc.group_id = 2;
strawberry写道:
strawberry wrote:
Stephen写道:
Stephen wrote:
我是非营利组织的志愿者,他们在多个数据库中有很多名字。问题是有些人在多个b
数据库中。如果他们从多个数据库发送邮件,那么人们会得到2个和3个相同的东西。我的想法是制作或找到一个
程序,每个人都是1个数据库,然后让人们成为
多个组的一部分。 (例如:bill是a组和b组的一部分,我正在邮寄
来自两个组我只想要一封邮件给他)。
它可以是一个单独的程序或访问。现在使用访问,但我不能
弄清楚如何让我的想法发挥作用。
如有问题请询问。
tia
Stephen
I volunteer for a non-for profit group and they have alot of names in a
multiple databases. the problem is that some people are in multiple
databases. and if they send out a mailing from multiple databases some
people get 2 and 3 of the same thing. my idea was to either make or find a
program that has everyone is 1 database and then make the people part of
multiple groups. (ex: bill is part of group a and b and im doing a mailing
from both group i only want 1 piece of mail to go to him).
It can be a separate program or with access. that use access now but i cant
figure out how to make my idea work.
any question please ask.
tia
Stephen
首先你应该只有一个数据库!!!
数据库应该有3个表:
联系人(contact_id,f_name,l_name,street1,street2,email1address等等)
groups(group_id,group_name ,group_description)
groups_contacts(group_id,contact_id)
您的查询将如下所示(未经测试)
SELECT DISTINCT(gc.contact_id),c。*
FROM group_contacts AS gc
LEFT JOIN contacts c ON c.contact_id = gc.contact_id;
First off you should only have ONE database!!!
Within that database there should be 3 tables:
contacts(contact_id,f_name,l_name,street1,street2, email1address,etc,etc)
groups(group_id,group_name,group_description)
groups_contacts(group_id,contact_id)
Your query would then look like this (untested)
SELECT DISTINCT(gc.contact_id),c.*
FROM group_contacts AS gc
LEFT JOIN contacts c ON c.contact_id = gc.contact_id;
糟糕,该查询应该是这样的(再次未经测试):
SELECT DISTINCT(gc.contact_id),c 。*
来自group_contacts AS gc
LEFT JOIN联系人c ON c.contact_id = gc.contact_id
WHERE gc.group_id = 1
或gc.group_id = 2;
Oops, that query should be like this (again untested):
SELECT DISTINCT(gc.contact_id),c.*
FROM group_contacts AS gc
LEFT JOIN contacts c ON c.contact_id = gc.contact_id
WHERE gc.group_id = 1
OR gc.group_id = 2;
这篇关于帮助数据库解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!