By admin | October 28, 2009

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; 

2 comments | Add One

  1. admin - 10/28/2009 at 10:17 am

    D

  2. sims - 08/2/2013 at 10:35 pm

    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

Leave a Comment

Leave a Reply

Your email address will not be published.