Performing Queries Using SQL |
Specifying the
Table |
After you write the SELECT clause, you then specify the table to be queried in the FROM clause. Simply type the keyword FROM, followed by the name of the SAS table. |
proc sql; select id,lastname,netpay,grosspay, grosspay*.06 as bonus from emplib.payroll where netpay>25000 order by lastname; |
The PROC SQL step above queries the permanent SAS table Payroll, which is stored in a SAS library that is assigned the libref Emplib. |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.