Question: As the module material stated, although Access doesnt create a stored procedure, a parameter query mimics what a stored procedure might do. How would you
As the module material stated, although Access doesn’t create a stored procedure, a parameter query mimics what a stored procedure might do. How would you create a parameter query in SQL to prompt for the patient’s last name and display the patient’s last name and their therapy?
a. SELECT (ENTER Patient.LastName), Therapies.Description FROM Therapies INNER JOIN (Patient INNER JOIN [Session] ON Patient.PatientNum = Session.PatientNum) ON Therapies.TherapyCode = Session.TherapyCode;
b. SELECT Therapies.Description FROM Therapies INNER JOIN (Patient INNER JOIN [Session] ON Patient.PatientNum = Session.PatientNum) ON Therapies.TherapyCode = Session.TherapyCode WHERE (((Patient.LastName)=[Enter Last Name]));
c. SELECT Patient.LastName, Therapies.Description FROM Therapies WHERE (((Patient.LastName)=[Enter Last Name]));
d. SELECT Patient.LastName, Therapies.Description FROM Therapies INNER JOIN (Patient INNER JOIN [Session] ON Patient.PatientNum = Session.PatientNum)
ON Therapies.TherapyCode = Session.TherapyCode WHERE (((Patient.LastName)=[Enter Last Name]));
Session Num 27 28 29 30 31 32 33 34 35 36 37 38 SessionDate 10/10/2021 10/11/2021 10/11/2021 10/12/2021 10/15/2021 10/16/2021 10/17/2021 10/17/2021 10/18/2021 10/18/2021 10/19/2021 10/19/2021 PatientNum 1011 1016 1014 1013 1016 1018 1017 1015 1010 1019 1020 1021 Length OfSession 45 30 60 30 90 15. 60 45 30 75 30 60 TherapistID JR085 AS648 SW124 BM273 AS648 JR085 SN852 BM273 SW124 SN852 BM273 AS648 TherapyCode 92507 97010 97014 97033 98960 97035 97039 97112 97113 97116 97124 97535
Step by Step Solution
3.44 Rating (154 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
