Results 1 to 3 of 3
  1. #1
    jozino is offline Novice
    Windows XP Access 2000
    Join Date
    Apr 2015
    Posts
    7

    combine data

    I have one table, PEOPLE, with names
    id nameLast nameFirst
    000003 Sherwood Hugh
    000004 Walter Wolfgang - 01
    000005 McFadden Bruce - 01
    000006 Power Des

    another table, TELE_LINK, with phone numbers and emails
    idPerson idTeleType useAreaCodeFormat numberOrAddress
    000003 01 -1 2505463008
    000003 03 -1 2505425276
    000011 01 -1 2062921428
    000011 02 -1 2062921426
    000012 01 -1 6048829663
    000012 02 -1 6048829669



    idfTeleType represents what type it is - home phone, office phone, fax, email, etc.

    I need to make a query which would show all phones and email in one row for one each person -
    First Name Last Name Company Phone Home Phone Other Phone Mobile Fax Email
    and put NULL or empty cell if record (tel. number or email) doesn't exist

    I tried to do it for emails (TELE_LINK.idTeleType="10") only but is only shows records if email exists

    SELECT PEOPLE.nameLast, PEOPLE.nameFirst, TELE_LINK.numberOrAddress
    FROM TELE_LINK RIGHT JOIN PEOPLE ON TELE_LINK.idPerson = PEOPLE.id
    WHERE (((TELE_LINK.idTeleType)="10"));

    any idea please?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    You need a table to convert Telecode to Name.
    01, home
    02, cell
    etc.

    Qry1 will join your 3 tables to get all your data.
    Q2 is a Crosstab qry of Q1 to put it in the format you have above.

  3. #3
    jozino is offline Novice
    Windows XP Access 2000
    Join Date
    Apr 2015
    Posts
    7
    Well, there is already this table
    id description idTeleTypeType
    01 Office Tel 1
    02 Office Fax 2
    03 Home Tel 1
    04 Cell Phone 7
    05 Toll Free 1
    06 Internet 4
    07 Office Tel2 1
    08 Pager 3
    09 Lake 1
    10 E-mail 5
    11 alternate fax 2
    12 Fax 2
    13 Tel 1
    14 Cottage 1
    15 web page 4
    16 Summer 1
    17 Winter 1
    18 Tel2 1
    19 Phone 1
    20 Home Fax 2
    21 Home Tel in summer 1
    22 Home Tel in winter 1
    23 apartment tel 1
    24 510-271-2712 1

    but I just want to attach home phone, office phone, fax and email to each person from the PEOPLE table (or empy cell or NULL if non existing)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combine data from one table
    By Ray67 in forum Queries
    Replies: 19
    Last Post: 08-04-2014, 07:12 AM
  2. Combine Similar Data From Three Queries
    By Kerberos in forum Reports
    Replies: 2
    Last Post: 05-02-2014, 11:27 AM
  3. Combine data
    By DSM1957 in forum Queries
    Replies: 1
    Last Post: 07-16-2012, 04:51 AM
  4. Combine duplicated data in a report
    By padfoot in forum Reports
    Replies: 3
    Last Post: 03-24-2012, 08:41 AM
  5. Combine data from 3 different tables
    By udigold1 in forum Queries
    Replies: 3
    Last Post: 06-29-2011, 12:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums