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 MEANS Procedure 859Output 29.13Creating a DBMS TableEmployees with salaries over $40,000LASTNAME FIRSTNAME SALARYWELCH DARIUS $40,858.00VENTER RANDALL $66,558.00MARSHBURN JASPER $89,632.00THOMPSON WAYNE $89,977.00RHODES JEREMY $40,586.00KIMANI ANNE $40,899.00CASTON FRANKLIN $41,690.00STEPHENSON ADAM $42,178.00BANADYGA JUSTIN $88,606.00O’NEAL BRYAN $40,079.00RIVERS SIMON $53,798.00MORGAN ALFRED $42,264.00Using Other <strong>SAS</strong> Procedures with DBMS DataOverviewExamples in this section illustrate basic uses of other <strong>SAS</strong> procedures with librefsthat refer to DBMS data.Using the MEANS ProcedureThis example uses the PRINT and MEANS procedures on a <strong>SAS</strong> data set createdfrom the Oracle table March. The MEANS procedure provides in<strong>for</strong>mation about thelargest number of passengers on each flight.libname mydblib oracle user=testuser password=testpass;title ’Number of Passengers per Flight by Date’;proc print data=mydblib.march noobs;var dates boarded;by flight dest;sumby flight;sum boarded;<strong>for</strong>mat dates datetime9.;run;title ’Maximum Number of Passengers per Flight’;proc means data=mydblib.march fw=5 maxdec=1 max;var boarded;class flight;run;

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

Saved successfully!

Ooh no, something went wrong!