Quiz

Select the best answer for each question. After completing the quiz, check your answers using the answer key in the appendix.
  1. Which of the following statements is false regarding a PROC SQL view?
    1. A view cannot be used in a join.
    2. A view accesses the most current underlying data.
    3. A view follows the same naming conventions as a table.
    4. A view can be used in SAS programs in place of an actual SAS data file.
  2. Which of the following statements describes an advantage of using a PROC SQL view?
    1. Views often save space, because a view is usually quite small compared with the data that it accesses.
    2. Views prevent users from continually submitting queries to omit unwanted columns or rows.
    3. Views hide complex joins or queries from users.
    4. all of the above
  3. Which PROC SQL step creates a view that queries the table Sasuser.Payrollmaster?
    1. proc sql;
         insert into sasuser.newview
            select * from sasuser.payrollmaster;
    2. proc sql;
         create sasuser.newview as
            select * from sasuser.payrollmaster;
    3. proc sql;
         create view sasuser.newview as
            select * from sasuser.payrollmaster;
    4. proc sql;
         select * from sasuser.payrollmaster
            into view sasuser.newview;
  4. Which of the following PROC SQL steps enables you to see a description of the view definition?
    1. proc sql;
         select * from sasuser.payrollmasterv;
    2. proc sql;
         describe view sasuser.payrollmasterv;
    3. proc sql;
         list sasuser.payrollmasterv;
    4. proc sql;
         contents view=sasuser.payrollmasterv;
  5. Which PROC SQL step correctly references the view Data.Empview?
    1. proc sql;
         select *
            from data.empview;
    2. proc sql; 
         select * 
            from view data.empview;
    3. proc sql; 
         select view * 
            from data.empview;
    4. proc sql; 
         select * 
            from data
            where view='empview';
  6. Which of the following PROC SQL steps correctly embeds a LIBNAME statement with a view definition?
    1. proc sql;
         insert into sasuser.newview
            select * from airline.supervisors
               libname airline 'c:mysql';
    2. proc sql;
         create view sasuser.newview as
            from airline.supervisors
               embed libname airline 'c:mysql';
    3. proc sql;
         using airline 'c:mysql';
            insert into sasuser.newview
               select * from airline.supervisors;
    4. proc sql;
         create view sasuser.newview as
            select * from airline.supervisors
               using libname airline 'c:mysql';
  7. PROC SQL views can access data from:
    1. a SAS data file.
    2. another PROC SQL view.
    3. a relational database table.
    4. all of the above
  8. When you are working with PROC SQL views, it is best to:
    1. avoid using an ORDER BY clause in a view.
    2. avoid creating views that are based on tables whose structure might change.
    3. specify a one-level name in the FROM clause if the view resides in the same SAS library as the contributing table(s).
    4. all of the above
  9. You can update the data underlying PROC SQL view using the INSERT, DELETE, and UPDATE statements under which of the following conditions:
    1. The view is joined or linked to another table.
    2. The view contains a subquery.
    3. The view contains a WHERE clause.
    4. all of the above
  10. Which of the following programs drops (deletes) a view?
    1. proc sql;
         delete sasuser.newview;
    2. proc sql;
         drop view sasuser.newview;
    3. proc sql;
         erase view sasuser.newview;
    4. proc sql;
         remove newview from sasuser;
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.21.152