HI,
How would I make this statement only pull the most recent record by date. I have older records as well as new for the same person and I want just the most recent record in the query along with the other criteria status "Received".
here's my statement so far but i can't figure out the criteria for only the most recent record:
ALTER PROCEDURE dbo.filmstatusquery
AS SELECT dbo.tblFilmStatus.Date, dbo.tblFilmStatus.Type, dbo.tblFilmStatus.Status, dbo.tblFilmStatus.Notes, dbo.Contacts.FirstName, dbo.Contacts.LastName,
dbo.Contacts.EmailName, dbo.Contacts.HomePhone
FROM dbo.tblFilmStatus INNER JOIN
dbo.Contacts ON dbo.tblFilmStatus.ContactID = dbo.Contacts.ContactID
WHERE (dbo.tblFilmStatus.Status <> N'Received')
thanks!
How would I make this statement only pull the most recent record by date. I have older records as well as new for the same person and I want just the most recent record in the query along with the other criteria status "Received".
here's my statement so far but i can't figure out the criteria for only the most recent record:
ALTER PROCEDURE dbo.filmstatusquery
AS SELECT dbo.tblFilmStatus.Date, dbo.tblFilmStatus.Type, dbo.tblFilmStatus.Status, dbo.tblFilmStatus.Notes, dbo.Contacts.FirstName, dbo.Contacts.LastName,
dbo.Contacts.EmailName, dbo.Contacts.HomePhone
FROM dbo.tblFilmStatus INNER JOIN
dbo.Contacts ON dbo.tblFilmStatus.ContactID = dbo.Contacts.ContactID
WHERE (dbo.tblFilmStatus.Status <> N'Received')
thanks!