M
Mariah
Hello,
I created a query from a customer address table to pull out the people who
use aol. This query has the following fields: Name (this field compiles
their title, firstname and lastname into one field), MailAddress1,
MailAddress2, MailCity, MailState, MailZip. This query works very well and
does just what I need it to do.
I am trying to create a new query based off this one to concatenate the
people who live at the same address so they only receive one notice. The
concatenation is working for consolidating the addresses, but it is not
showing me any names in the concat column. I tried backtracking and just
using last names in the original query, but the concat column still didn't
show me any names.
This is what I have in the concatenation SQL:
SELECT qryAOLEmailusers.MailAddress1, qryAOLEmailusers.MailAddress2,
qryAOLEmailusers.MailCity, qryAOLEmailusers.MailState,
qryAOLEmailusers.MailZip, qryAOLEmailusers.Country, Concatenate("SELECT
[IndexName] FROM qryAOLEmailusers WHERE MailAddress1 & MailAddress2 &
MailCity & MailState & MailZip =""" & [MailAddress1] & [MailAddress2] &
[MailCity] & [MailState] & [MailZip] & """",", ") AS Concat
FROM qryAOLEmailusers
WHERE (((qryAOLEmailusers.CustomerType) In ("Sister","Associate")))
GROUP BY qryAOLEmailusers.MailAddress1, qryAOLEmailusers.MailAddress2,
qryAOLEmailusers.MailCity, qryAOLEmailusers.MailState,
qryAOLEmailusers.MailZip, qryAOLEmailusers.Country, Concatenate("SELECT
[IndexName] FROM qryAOLEmailusers WHERE MailAddress1 & MailAddress2 &
MailCity & MailState & MailZip =""" & [MailAddress1] & [MailAddress2] &
[MailCity] & [MailState] & [MailZip] & """",", ");
I appreciate any help anyone can give me. I don't know where to go from
here...
I created a query from a customer address table to pull out the people who
use aol. This query has the following fields: Name (this field compiles
their title, firstname and lastname into one field), MailAddress1,
MailAddress2, MailCity, MailState, MailZip. This query works very well and
does just what I need it to do.
I am trying to create a new query based off this one to concatenate the
people who live at the same address so they only receive one notice. The
concatenation is working for consolidating the addresses, but it is not
showing me any names in the concat column. I tried backtracking and just
using last names in the original query, but the concat column still didn't
show me any names.
This is what I have in the concatenation SQL:
SELECT qryAOLEmailusers.MailAddress1, qryAOLEmailusers.MailAddress2,
qryAOLEmailusers.MailCity, qryAOLEmailusers.MailState,
qryAOLEmailusers.MailZip, qryAOLEmailusers.Country, Concatenate("SELECT
[IndexName] FROM qryAOLEmailusers WHERE MailAddress1 & MailAddress2 &
MailCity & MailState & MailZip =""" & [MailAddress1] & [MailAddress2] &
[MailCity] & [MailState] & [MailZip] & """",", ") AS Concat
FROM qryAOLEmailusers
WHERE (((qryAOLEmailusers.CustomerType) In ("Sister","Associate")))
GROUP BY qryAOLEmailusers.MailAddress1, qryAOLEmailusers.MailAddress2,
qryAOLEmailusers.MailCity, qryAOLEmailusers.MailState,
qryAOLEmailusers.MailZip, qryAOLEmailusers.Country, Concatenate("SELECT
[IndexName] FROM qryAOLEmailusers WHERE MailAddress1 & MailAddress2 &
MailCity & MailState & MailZip =""" & [MailAddress1] & [MailAddress2] &
[MailCity] & [MailState] & [MailZip] & """",", ");
I appreciate any help anyone can give me. I don't know where to go from
here...