Expiring members between two dates (mail)
###
Membership
###
34701/Any rev02
###
Owner info for all members expiring between two dates
###
en
###
SELECT DISTINCT o.OwnerName,o.OwnerAddress, o.OwnerTown, o.OwnerCounty, o.OwnerPostcode, 
o.HomeTelephone, o.WorkTelephone, o.EmailAddress, o.EmailAddress2, o.OwnerTitle, o.OwnerForenames,
o.OwnerSurname, o.MembershipExpiryDate, o.MembershipNumber
FROM owner o
WHERE o.IsMember = 1 AND o.MembershipExpiryDate Is Not NULL 
AND o.MembershipExpiryDate >= '$ASK DATE Show members expiring between$' 
AND o.MembershipExpiryDate <= '$ASK DATE and $'
AND o.ExcludeFromBulkEmail = 0 AND o.IsDeceased = 0
ORDER BY MembershipExpiryDate
###
MAIL
