Date query...again

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top