[mso] Re: SQL in Access :VSMail mx1

  • From: "Jim Pettit" <j_e_pettit@xxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Mon, 7 Mar 2005 07:24:01 -0800

Glenda--

In one query, then (and perhaps I missed it, but that requirement wasn't
clear in your previous emails):

SELECT  sqryCADDR.personID, CADDR.caddrNmbr
FROM (SELECT personID, MAX(caddrID) as MaxOfcaddrID
FROM CADDR
WHERE caddrType = 'email'
GROUP BY personID
ORDER BY MAX(caddrID)) sqryCADDR INNER JOIN
CADDR ON sqryCADDR.MaxOfcaddrID = CADDR.caddrID

This is still going to return the name and email address with the highest
caddrID for each person with an email address in the table, so you're still
going to need to filter out all but the person you want.

You're welcome.

--Jim 

-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf
Of Glenda Wells
Sent: Monday, March 07, 2005 6:56 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: SQL in Access :VSMail mx1

Hi Jim and all.

I can get the result I need by making queries...I do that all the time.
I was hoping to be able to do it completely with SQL from the report and
not have to use queries. =20

=20
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: