13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Accessing DBMS Data with the LIBNAME Statement 4 Using the TABULATE Procedure 863Output 29.17Using the RANK ProcedureRanking of Delayed Flights 1OBS FLIGHT DATES ORIG DEST DELAYCAT DESTYPE DELAY RANKING1 114 01MAR1998 LGA LAX 1-10 Minutes Domestic 8 92 202 01MAR1998 LGA ORD No Delay Domestic -5 423 219 01MAR1998 LGA LON 11+ Minutes International 18 44 622 01MAR1998 LGA FRA No Delay International -5 425 132 01MAR1998 LGA YYZ 11+ Minutes International 14 86 271 01MAR1998 LGA PAR 1-10 Minutes International 5 137 302 01MAR1998 LGA WAS No Delay Domestic -2 368 114 02MAR1998 LGA LAX No Delay Domestic 0 289 202 02MAR1998 LGA ORD 1-10 Minutes Domestic 5 1310 219 02MAR1998 LGA LON 11+ Minutes International 18 411 622 02MAR1998 LGA FRA No Delay International 0 2812 132 02MAR1998 LGA YYZ 1-10 Minutes International 5 1313 271 02MAR1998 LGA PAR 1-10 Minutes International 4 1914 302 02MAR1998 LGA WAS No Delay Domestic 0 2815 114 03MAR1998 LGA LAX No Delay Domestic -1 3216 202 03MAR1998 LGA ORD No Delay Domestic -1 3217 219 03MAR1998 LGA LON 1-10 Minutes International 4 1918 622 03MAR1998 LGA FRA No Delay International -2 3619 132 03MAR1998 LGA YYZ 1-10 Minutes International 6 1220 271 03MAR1998 LGA PAR 1-10 Minutes International 2 25Using the TABULATE ProcedureThis example uses the TABULATE procedure on the Oracle table Payroll to display achart of the number of employees <strong>for</strong> each job code.libname mydblib oracle user=testuser password=testpass;title "Number of Employees by Jobcode";proc tabulate data=mydblib.payroll <strong>for</strong>mat=3.0;class jobcode;table jobcode*n;keylabel n="#";run;Output 29.18Using the TABULATE ProcedureNumber of Employees by Jobcode 1-----------------------------------------------------------------| JOBCODE ||---------------------------------------------------------------||BCK|FA1|FA2|FA3|ME1|ME2|ME3|NA1|NA2|PT1|PT2|PT3|SCP|TA1|TA2|TA3||---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|| # | # | # | # | # | # | # | # | # | # | # | # | # | # | # | # ||---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|| 9| 11| 16| 7| 8| 14| 7| 5| 3| 8| 10| 2| 7| 9| 20| 12|-----------------------------------------------------------------

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!