Date query...again

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

SELECT tPtData.ingPtID, tPtData.strLastName, tPtData.strFirstName,
tPtData.strFrstSeen, tVisit.dtmVisitDate, tVisit.[sng#MissFng],
tVisit.[sng#MissToe], tVisit.ysnLimbLoss
FROM tPtData INNER JOIN tVisit ON tPtData.ingPtID = tVisit.ingPtID


Thank you for the help yesterday, however, when I use the query suggested
I'm getting a parameter query.

Above is the query I am using. It returns ALL of the patient visits whereas
I ONLY want the patient visits that match (this would be strFirstSeen =
dtmVisitDate). Both are dates. tPtData and tVisit both have PtID as their
relationship. I cannot figure out how for it to give me just the one date
and not all subsequent dates.
 
Try this --
SELECT tPtData.ingPtID, tPtData.strLastName, tPtData.strFirstName,
tPtData.strFrstSeen, tVisit.dtmVisitDate, tVisit.[sng#MissFng],
tVisit.[sng#MissToe], tVisit.ysnLimbLoss
FROM tPtData INNER JOIN tVisit ON tPtData.ingPtID = tVisit.ingPtID
WHERE tPtData.strFrstSeen=tVisit.dtmVisitDate
 
Back
Top