SAS Certified Adv Programmer 130 Questions (7)
Which one of the following programs contains a syntax error?
A.
proc sql;
select product.*, cost.unitcost, sales .quantity
from product p, cost c, sales s
where p.item = c.item and p.item = s.item;
quit;
B.
proc sql;
select product.*, cost.unitcost, sales.quantity
from product, cost,
sales where product.item = cost.item and product.item = sales.item;
quit;
C.
proc sql;
select p.*, c.unitcost, s.quantity
from product as p, cost as c, sales as s
where p.item = c.item and p.item = s.item;
quit;
D.
proc sql;
select p.*, c.unitcost, s.quantity
from product, cost, sales
where product.item = cost.item and product.item = sales.item;
quit;
Topics:
SAS Adv Questions |
2 Comments »
D
the correct answer is A because the space between sales and quantity is a typing error , but in D there is reference to c.unitcost and s.quantity of which c and s are not defined