473,385 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SELECT Query Help - Multiple Records

Hi,

Hoping to get some help modifying the following query that I have...

TABLE: NAMES
ID, FirstName, LastName

TABLE: EMAILS
ID,LinkID,Email,LastUpdateDate

I have two tables, one of Names, one of Emails. Each person only has
one record in the Names table. Each person however, may have multiple
email addresses in the Emails table. I want to pull a query that
returns a person's name, and the latest email address on file.

I am able to successfully pull a full extract that shows names and
emails, but I can't figure out how to limit it to the latest email
address. So in essence, I am getting a row for each name for each
listed email. Which means some names appear multiple times because
they have multiple, older, email addresses on record.

How can I limit this?

THANKS!

Aug 8 '07 #1
1 2641
Jordan, what you need is a query that will show the latest email ID (by
date) for each value of LinkID, so you can then join the Names table to
that query. For help on that, see this article:
http://www.mvps.org/access/queries/qry0020.htm

-John

Jordan M. wrote:
Hi,

Hoping to get some help modifying the following query that I have...

TABLE: NAMES
ID, FirstName, LastName

TABLE: EMAILS
ID,LinkID,Email,LastUpdateDate

I have two tables, one of Names, one of Emails. Each person only has
one record in the Names table. Each person however, may have multiple
email addresses in the Emails table. I want to pull a query that
returns a person's name, and the latest email address on file.

I am able to successfully pull a full extract that shows names and
emails, but I can't figure out how to limit it to the latest email
address. So in essence, I am getting a row for each name for each
listed email. Which means some names appear multiple times because
they have multiple, older, email addresses on record.

How can I limit this?

THANKS!
Aug 8 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Randell D. | last post by:
Folks, I have a SELECT that returns with multiple records - It works when I have a LIMIT clause but when I try to include a GROUP BY clause, the select returns nothing (ie no records, no...
6
by: Michael | last post by:
I have two tables with a 1-many relationship. I want to write a select statement that looks in the table w/many records and compares it to the records in the primary table to see if there are any...
0
by: jtocci | last post by:
I'm having a big problem with CREATE RULE...ON INSERT...INSERT INTO...SELECT...FROM...WHERE when I want to INSERT several (20~50) records based on a single INSERT to a view. Either I get a 'too...
4
by: Nicolae Fieraru | last post by:
Hi All, I have a Table1 with ID, Name, Address, Purchase. I want to build a query which shows all the records from Table1 (only fields ID, Name, Address), but there shouldn't be listed records...
4
by: Ben | last post by:
I believe I am missunderstanding how subqueries work. I simple subquery works fine but when I wish do compare 2 or more fields at once I don't get the results I wish. Table A...
8
by: Jean | last post by:
Hello all, I have the following data, that was queried and sorted to columns PROBLEM_ID and then by STATUSDATE (ascending): STATUS_ID STATUSDATE PROBLEM_ID --------- ---------- ...
1
by: JJ | last post by:
I need to do a SELECT query that joins four tables. The largest of the tables could eventually have over 1 million records. I need to do a SELECT that returns a maximum of 1000 records which will...
0
kcdoell
by: kcdoell | last post by:
Hello: I have a form that I am using to help me display a query that I have built. On that form I have multiple combo boxes that I have called cobMonth, cobYear, cobWorkingRegion, etc......
1
by: KrazyKasper | last post by:
Access 2003 – Multi-Column List Box – Select Multiple Items I have a multi-column (3 columns) list box that works well to select one set of records or all sets of records (based on the first field...
1
by: themightyrhino | last post by:
I'm writing a process to perform multiple updates on a main table from information stored in different component reports. As you can see from the below, I'm using a select query to base the update...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.