Chapter Contents |
Previous |
Next |
The SQL Procedure |
Procedure features: |
| |||
Tables: | PROCLIB.STAFF, PROCLIB.SCHEDULE, PROCLIB.SUPERV |
Program |
libname proclib 'SAS-data-library';
options nodate pageno=1 linesize=80 pagesize=60;
proc sql outobs=10; title 'All Flights for Each Supervisor'; select * |
from (select lname, s.idnum, city, jobcat, flight, date from proclib.schedule2 s, proclib.staff2 t, proclib.superv2 v where s.idnum=t.idnum and t.idnum=v.supid) |
as three (Surname, Emp_ID, Hometown, Jobtype, FlightNumber, FlightDate); |
Output |
All Flights for Each Supervisor 1 Job Surname Emp_ID Hometown Category FlightNumber FlightDate ---------------------------------------------------------------------------- MARSHBURN 1106 STAMFORD PT 579 05MAR94 DENNIS 1118 NEW YORK PT 132 01MAR94 DENNIS 1118 NEW YORK PT 271 04MAR94 KIMANI 1126 NEW YORK TA 579 05MAR94 TUCKER 1882 NEW YORK ME 622 03MAR94 |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.