Help With Database Solution
Help With Database Solution
am 04.08.2006 13:13:04 von 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
Re: Help With Database Solution
am 04.08.2006 13:46:42 von zac.carey
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,email1addr ess,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
am 04.08.2006 13:49:43 von zac.carey
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,email1addr ess,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
am 04.08.2006 13:51:02 von zac.carey
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,email1addr ess,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
am 04.08.2006 13:55:36 von Stephen
yopu say 3 tables...contacts is the table and the stuff in the () is the
fiels names?
"strawberry" wrote in message
news:1154692262.802400.120910@h48g2000cwc.googlegroups.com.. .
> 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,email1addr ess,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
am 04.08.2006 13:58:07 von zac.carey
Stephen wrote:
> yopu say 3 tables...contacts is the table and the stuff in the () is the
> fiels names?
>
>
> "strawberry" wrote in message
> news:1154692262.802400.120910@h48g2000cwc.googlegroups.com.. .
> > 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,email1addr ess,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
am 04.08.2006 14:02:45 von Stephen
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" wrote in message
news:1154692686.988284.223750@s13g2000cwa.googlegroups.com.. .
>
> Stephen wrote:
>> yopu say 3 tables...contacts is the table and the stuff in the () is the
>> fiels names?
>>
>>
>> "strawberry" wrote in message
>> news:1154692262.802400.120910@h48g2000cwc.googlegroups.com.. .
>> > 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,email1addr ess,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
am 04.08.2006 14:03:19 von Stephen
and do i need a primary key
"strawberry" wrote in message
news:1154692686.988284.223750@s13g2000cwa.googlegroups.com.. .
>
> Stephen wrote:
>> yopu say 3 tables...contacts is the table and the stuff in the () is the
>> fiels names?
>>
>>
>> "strawberry" wrote in message
>> news:1154692262.802400.120910@h48g2000cwc.googlegroups.com.. .
>> > 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,email1addr ess,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
am 04.08.2006 14:06:45 von zac.carey
Stephen wrote:
> and do i need a primary key
contacts(contact_id*,f_name,l_name,street1,street2,email1add ress,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
am 04.08.2006 14:09:56 von zac.carey
Stephen wrote:
> 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
am 04.08.2006 14:11:04 von Stephen
ok ty
"strawberry" wrote in message
news:1154693205.586597.207140@h48g2000cwc.googlegroups.com.. .
>
> Stephen wrote:
>> and do i need a primary key
>
> contacts(contact_id*,f_name,l_name,street1,street2,email1add ress,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
>