Question
4.The prescription table stores data about the medicines that have been prescribed for patients. The chief of pharmacology needs a listing of patients (last and
4.The prescription table stores data about the medicines that have been prescribed for patients. The chief of pharmacology needs a listing of patients (last and first name) who have received either Valium or Demerol (medicine_code= 9999003 or 9999002). Use a subquery approach. 5. Modify the query for Question 4 to display the output sorted by patient last name, and then by patient first name
I tried the order by clause after the where clause and got this message.
Msg 1033, Level 15, State 1, Line 29 The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started