Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / September 2004

Tip: Looking for answers? Try searching our database.

Query to return same record more than once

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill Morrison - 18 Sep 2004 16:31 GMT
I have a table that holds customer contact information.  The table has
three email fields (Email1, Email2, and Email3).  So each customer can
have up to 3 contact email addresses.

I need a query that will return the customers name with each of their
email addresses.

ie If customer has 3 email addresses then following is returned:

Bill Morrison Email1
Bill Morrison Email2
Bill Morrison Email3

Hope this makes sense

Thanks
MGFoster - 18 Sep 2004 18:50 GMT
It would be better to put the email addresses in a separate table.  This
will Normalize your db.  E.g.:

Customers            CustEmails
- -----------          ---------------
CustID      1-->m    CustID,
<other fields>       Email

This way you can have many emails per customer.

The query would be like this:

SELECT C.FirstName & " " & C.LastName, E.Email
FROM Customers As C INNER JOIN CustEmails As E
  ON C.CustID = E.CustID
WHERE <criteria>

Signature

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

> I have a table that holds customer contact information.  The table has
> three email fields (Email1, Email2, and Email3).  So each customer can
[quoted text clipped - 8 lines]
> Bill Morrison Email2
> Bill Morrison Email3
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.