A00-212 Exam QuestionsBrowse all questions from this exam

A00-212 Exam - Question 18


SIMULATION -

This question will ask you to provide a segment of missing code.

Given the two data sets on the left, the SAS program on the right is submitted.

In the text box in the program above, complete the program so that it will properly use the macro variable to select the corresponding cities.

Case is ignored and standard SAS syntax rules apply.

Show Answer
Correct Answer:

The missing code should use the macro variable 'Selection' defined at the beginning of the program. In SAS, to use a macro variable within a SQL query, you need to reference it with an ampersand (&). Therefore, the correct line should be 'where s.state = "&Selection";'. This ensures that the macro variable 'Selection' is correctly substituted with 'North Carolina' during execution. The complete line is: where s.state = "&Selection";

Discussion

1 comment
Sign in to comment
mhminkov
Aug 20, 2021

"&selection"