Help With Database Solution

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stephen

    #1

    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


  • strawberry

    #2
    Re: Help With Database Solution


    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(contac t_id,f_name,l_n ame,street1,str eet2,email1addr ess,etc,etc)
    groups(group_id ,group_name,gro up_description)
    groups_contacts (group_id,conta ct_id)

    Your query would then look like this (untested)

    SELECT DISTINCT(gc.con tact_id),c.*
    FROM group_contacts AS gc
    LEFT JOIN contacts c ON c.contact_id = gc.contact_id;

    Comment

    • strawberry

      #3
      Re: Help With Database Solution


      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(contac t_id,f_name,l_n ame,street1,str eet2,email1addr ess,etc,etc)
      groups(group_id ,group_name,gro up_description)
      groups_contacts (group_id,conta ct_id)
      >
      Your query would then look like this (untested)
      >
      SELECT DISTINCT(gc.con tact_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.con tact_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;

      Comment

      • strawberry

        #4
        Re: Help With Database Solution

        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(contac t_id,f_name,l_n ame,street1,str eet2,email1addr ess,etc,etc)
        groups(group_id ,group_name,gro up_description)
        groups_contacts (group_id,conta ct_id)
        >
        Your query would then look like this (untested)
        >
        SELECT DISTINCT(gc.con tact_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.con tact_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;

        Comment

        • Stephen

          #5
          Re: Help With Database Solution

          yopu say 3 tables...contac ts is the table and the stuff in the () is the
          fiels names?


          "strawberry " <zac.carey@gmai l.comwrote in message
          news:1154692262 .802400.120910@ h48g2000cwc.goo glegroups.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(conta ct_id,f_name,l_ name,street1,st reet2,email1add ress,etc,etc)
          >groups(group_i d,group_name,gr oup_description )
          >groups_contact s(group_id,cont act_id)
          >>
          >Your query would then look like this (untested)
          >>
          >SELECT DISTINCT(gc.con tact_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.con tact_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;
          >

          Comment

          • strawberry

            #6
            Re: Help With Database Solution


            Stephen wrote:
            yopu say 3 tables...contac ts is the table and the stuff in the () is the
            fiels names?
            >
            >
            "strawberry " <zac.carey@gmai l.comwrote in message
            news:1154692262 .802400.120910@ h48g2000cwc.goo glegroups.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(contac t_id,f_name,l_n ame,street1,str eet2,email1addr ess,etc,etc)
            groups(group_id ,group_name,gro up_description)
            groups_contacts (group_id,conta ct_id)
            >
            Your query would then look like this (untested)
            >
            SELECT DISTINCT(gc.con tact_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.con tact_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

            Comment

            • Stephen

              #7
              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@gmai l.comwrote in message
              news:1154692686 .988284.223750@ s13g2000cwa.goo glegroups.com.. .
              >
              Stephen wrote:
              >yopu say 3 tables...contac ts is the table and the stuff in the () is the
              >fiels names?
              >>
              >>
              >"strawberry " <zac.carey@gmai l.comwrote in message
              >news:115469226 2.802400.120910 @h48g2000cwc.go oglegroups.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(conta ct_id,f_name,l_ name,street1,st reet2,email1add ress,etc,etc)
              >groups(group_i d,group_name,gr oup_description )
              >groups_contact s(group_id,cont act_id)
              >>
              >Your query would then look like this (untested)
              >>
              >SELECT DISTINCT(gc.con tact_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.con tact_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
              >

              Comment

              • Stephen

                #8
                Re: Help With Database Solution

                and do i need a primary key
                "strawberry " <zac.carey@gmai l.comwrote in message
                news:1154692686 .988284.223750@ s13g2000cwa.goo glegroups.com.. .
                >
                Stephen wrote:
                >yopu say 3 tables...contac ts is the table and the stuff in the () is the
                >fiels names?
                >>
                >>
                >"strawberry " <zac.carey@gmai l.comwrote in message
                >news:115469226 2.802400.120910 @h48g2000cwc.go oglegroups.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(conta ct_id,f_name,l_ name,street1,st reet2,email1add ress,etc,etc)
                >groups(group_i d,group_name,gr oup_description )
                >groups_contact s(group_id,cont act_id)
                >>
                >Your query would then look like this (untested)
                >>
                >SELECT DISTINCT(gc.con tact_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.con tact_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
                >

                Comment

                • strawberry

                  #9
                  Re: Help With Database Solution


                  Stephen wrote:
                  and do i need a primary key
                  contacts(contac t_id*,f_name,l_ name,street1,st reet2,email1add ress,etc,etc)
                  groups(group_id *,group_name,gr oup_description )
                  groups_contacts (group_id*,cont act_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

                  Comment

                  • strawberry

                    #10
                    Re: Help With Database Solution


                    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!

                    Comment

                    • Stephen

                      #11
                      Re: Help With Database Solution

                      ok ty
                      "strawberry " <zac.carey@gmai l.comwrote in message
                      news:1154693205 .586597.207140@ h48g2000cwc.goo glegroups.com.. .
                      >
                      Stephen wrote:
                      >and do i need a primary key
                      >
                      contacts(contac t_id*,f_name,l_ name,street1,st reet2,email1add ress,etc,etc)
                      groups(group_id *,group_name,gr oup_description )
                      groups_contacts (group_id*,cont act_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
                      >

                      Comment

                      Working...