Help With Database Solution | | |
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 | | | | re: Help With Database Solution
Stephen wrote: Quote:
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
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; | | | | re: Help With Database Solution
strawberry wrote: Quote:
Stephen wrote: Quote:
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
>
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;
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; | | | | re: Help With Database Solution
strawberry wrote: Quote:
Stephen wrote: Quote:
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
>
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;
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; | | | | re: Help With Database Solution
yopu say 3 tables...contacts is the table and the stuff in the () is the
fiels names?
"strawberry" <zac.carey@gmail.comwrote in message
news:1154692262.802400.120910@h48g2000cwc.googlegr oups.com... Quote:
strawberry wrote: Quote:
>Stephen wrote: Quote:
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
>>
>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;
>
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;
>
| | | | re: Help With Database Solution
Stephen wrote: Quote:
yopu say 3 tables...contacts is the table and the stuff in the () is the
fiels names?
>
>
"strawberry" <zac.carey@gmail.comwrote in message
news:1154692262.802400.120910@h48g2000cwc.googlegr oups.com... Quote:
strawberry wrote: Quote:
Stephen wrote:
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
>
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;
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;
yes, that's right | | | | re: Help With Database Solution
another uestion. i know there is a way to make drop downs so that can only
pick a certian item...they only use like 5 or 10 sgroups how do i make the
drop down so it can be selected
"strawberry" <zac.carey@gmail.comwrote in message
news:1154692686.988284.223750@s13g2000cwa.googlegr oups.com... Quote:
>
Stephen wrote: Quote:
>yopu say 3 tables...contacts is the table and the stuff in the () is the
>fiels names?
>>
>>
>"strawberry" <zac.carey@gmail.comwrote in message
>news:1154692262.802400.120910@h48g2000cwc.googleg roups.com... Quote:
strawberry wrote:
>Stephen wrote:
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
>>
>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;
>
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;
>
>
yes, that's right
>
| | | | re: Help With Database Solution
and do i need a primary key
"strawberry" <zac.carey@gmail.comwrote in message
news:1154692686.988284.223750@s13g2000cwa.googlegr oups.com... Quote:
>
Stephen wrote: Quote:
>yopu say 3 tables...contacts is the table and the stuff in the () is the
>fiels names?
>>
>>
>"strawberry" <zac.carey@gmail.comwrote in message
>news:1154692262.802400.120910@h48g2000cwc.googleg roups.com... Quote:
strawberry wrote:
>Stephen wrote:
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
>>
>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;
>
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;
>
>
yes, that's right
>
| | | | re: Help With Database Solution
Stephen wrote: Quote:
and do i need a primary key
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*)
* = Primary Key
Note that the Primary Key for the groups_contacts table is a
combination of both the group_id and the contact_id | | | | re: Help With Database Solution
Stephen wrote: Quote:
another uestion. i know there is a way to make drop downs so that can only
pick a certian item...they only use like 5 or 10 sgroups how do i make the
drop down so it can be selected
This sounds like an access question. Sorry, I don't anything about
access! | | | | re: Help With Database Solution
ok ty
"strawberry" <zac.carey@gmail.comwrote in message
news:1154693205.586597.207140@h48g2000cwc.googlegr oups.com... Quote:
>
Stephen wrote: Quote:
>and do i need a primary key
>
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*)
>
* = Primary Key
>
Note that the Primary Key for the groups_contacts table is a
combination of both the group_id and the contact_id
>
|  | Similar MySQL Database bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,533 network members.
|