Question
Simple Query Help Please
I have two related tables. tblVisits, and tblProcedure. Each
Visit has one or more procedures, linked on VisitIDNo.
What is the syntax to return ALL the visits, and only the FIRST procedure (CPT4)?
<cfquery name="GetAll" datasource="PaceAce">
SELECT tblVisits.VisitIDNo, tblProcedure.VisitIDNo, tblProcedure.CPT4
FROM tblVisits
JOIN tblProcedure ON tblVisits.VisitIDNo = tblProcedure.VisitIDNo
</cfquery>
What is the syntax to return ALL the visits, and only the FIRST procedure (CPT4)?
<cfquery name="GetAll" datasource="PaceAce">
SELECT tblVisits.VisitIDNo, tblProcedure.VisitIDNo, tblProcedure.CPT4
FROM tblVisits
JOIN tblProcedure ON tblVisits.VisitIDNo = tblProcedure.VisitIDNo
</cfquery>
