Question: You were asked to review the following code: PROC SQL; SELECT MEDICATION, PETID, COST, COST * . 0 7 5 AS TOTAL _ COST FORMAT
You were asked to review the following code:
PROC SQL;
SELECT MEDICATION, PETID, COST, COST AS
TOTALCOST FORMAT DOLLAR
CASE
WHEN TOTALCOST THEN 'Low Cost Med'
WHEN TOTALCOST THEN 'Average Cost Med'
WHEN TOTALCOST THEN 'High Cost Med'
WHEN TOTALCOST THEN 'Extremely High Cost Med'
ELSE No Cost Med or Unknown Med Cost'
END AS MEDCOSTCATEGORY
FROM WORK.PETMEDS;
Based on what has been provided, what is your assessment of this code?
Question options:
A
The code is correct as written and will run properly
B
There is an error in the Case expression so the code will not run properly
C
There is an error because there should not be a comma before the Case expression begins
D
The query creates a new field named TOTALCOST
E
If the value of TOTALCOST is the results of the query will be No Cost Med or Unknown Med Cost"
F
A & C are correct
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
