Active Reservations
###
Movements
###
34701/Any rev02
###
Contact info and animal details for active reservations
###
en
###
SELECT ShelterCode, AnimalName, ReservationDate, 
species.SpeciesName,
reservationstatus.StatusName,
animaltype.AnimalType AS theType,
animal.BreedName,
no.OwnerName, no.OwnerAddress,
no.OwnerTown, no.OwnerCounty,
no.OwnerPostcode, no.EmailAddress, no.EmailAddress2, no.HomeTelephone, no.WorkTelephone, no.MobileTelephone
FROM adoption
INNER JOIN animal ON adoption.AnimalID = animal.ID
INNER JOIN owner no ON adoption.OwnerID = no.ID
INNER JOIN animaltype ON animaltype.ID = animal.AnimalTypeID
INNER JOIN species ON species.ID = animal.SpeciesID
INNER JOIN reservationstatus ON reservationstatus.ID = adoption.ReservationStatusID
WHERE MovementType = 0 AND ReservationCancelledDate Is Null AND DeceasedDate Is Null 
ORDER BY ReservationDate
###
MAIL

