Hi,
I have the following query:
(SELECT qryRegistrantEvents.[Confirmation#], qryRegistrantEvents.LastName, qryRegistrantEvents.FirstName, qryRegistrantEvents.Title, qryRegistrantEvents.Organization, qryRegistrantEvents.Affiliation, qryRegistrantEvents.Reg, qryRegistrantEvents.EventId, qryRegistrantEvents.EventName, True AS ConferenceRegistrant, Sum(tblRegEvents.Qty) AS Guests
FROM tblRegEvents RIGHT JOIN qryRegistrantEvents ON (tblRegEvents.EventId = qryRegistrantEvents.EventId) AND (tblRegEvents.[Confirmation#] = qryRegistrantEvents.[Confirmation#])
GROUP BY qryRegistrantEvents.[Confirmation#], qryRegistrantEvents.LastName, qryRegistrantEvents.FirstName, qryRegistrantEvents.Title, qryRegistrantEvents.Organization, qryRegistrantEvents.Affiliation, qryRegistrantEvents.Reg, qryRegistrantEvents.EventId, qryRegistrantEvents.EventName, True)
UNION (SELECT Registration.[Confirmation#], Registration.LastName, Registration.FirstName, Registration.Title, Registration.Organization, Registration.Affiliation, Registration.Reg, tblRegEvents.EventId, tblEvents.EventName, False AS ConferenceRegistrant, Sum(tblRegEvents.Qty) AS Guests
FROM (Registration INNER JOIN tblRegEvents ON Registration.[Confirmation#] = tblRegEvents.[Confirmation#]) INNER JOIN tblEvents ON tblRegEvents.EventId = tblEvents.EventId
GROUP BY Registration.[Confirmation#], Registration.LastName, Registration.FirstName, Registration.Title, Registration.Organization, Registration.Affiliation, Registration.Reg, tblRegEvents.EventId, tblEvents.EventName
HAVING (((Registration.Reg) Is Null Or (Registration.Reg)="")));
It returns all the participants weather they have a guest or not. I would only like to see the ones that have gusts.
Where do i need to insert my "where Guests is equal or greater than 1" statement to accomplish it?
Thanks for any help you can provide.
Regards,
Rene.
I have the following query:
(SELECT qryRegistrantEvents.[Confirmation#], qryRegistrantEvents.LastName, qryRegistrantEvents.FirstName, qryRegistrantEvents.Title, qryRegistrantEvents.Organization, qryRegistrantEvents.Affiliation, qryRegistrantEvents.Reg, qryRegistrantEvents.EventId, qryRegistrantEvents.EventName, True AS ConferenceRegistrant, Sum(tblRegEvents.Qty) AS Guests
FROM tblRegEvents RIGHT JOIN qryRegistrantEvents ON (tblRegEvents.EventId = qryRegistrantEvents.EventId) AND (tblRegEvents.[Confirmation#] = qryRegistrantEvents.[Confirmation#])
GROUP BY qryRegistrantEvents.[Confirmation#], qryRegistrantEvents.LastName, qryRegistrantEvents.FirstName, qryRegistrantEvents.Title, qryRegistrantEvents.Organization, qryRegistrantEvents.Affiliation, qryRegistrantEvents.Reg, qryRegistrantEvents.EventId, qryRegistrantEvents.EventName, True)
UNION (SELECT Registration.[Confirmation#], Registration.LastName, Registration.FirstName, Registration.Title, Registration.Organization, Registration.Affiliation, Registration.Reg, tblRegEvents.EventId, tblEvents.EventName, False AS ConferenceRegistrant, Sum(tblRegEvents.Qty) AS Guests
FROM (Registration INNER JOIN tblRegEvents ON Registration.[Confirmation#] = tblRegEvents.[Confirmation#]) INNER JOIN tblEvents ON tblRegEvents.EventId = tblEvents.EventId
GROUP BY Registration.[Confirmation#], Registration.LastName, Registration.FirstName, Registration.Title, Registration.Organization, Registration.Affiliation, Registration.Reg, tblRegEvents.EventId, tblEvents.EventName
HAVING (((Registration.Reg) Is Null Or (Registration.Reg)="")));
It returns all the participants weather they have a guest or not. I would only like to see the ones that have gusts.
Where do i need to insert my "where Guests is equal or greater than 1" statement to accomplish it?
Thanks for any help you can provide.
Regards,
Rene.