Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


reorganize data

reorganize data

reorganize 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
WHERE (((TELE_LINK.idTeleType)="10"));

any idea please?

RE: reorganize data

Try a crosstab query based on a join between the tables. I expect you might want to add the lookup table for TeleType. The last and first names would be the Row Headings, TeleType is the Column Heading, and First of NumberOrAddress for the value.

Hook'D on Access
MS Access MVP

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close