proc sql outobs=15; select empid, jobcode, salary, salary * .10 as Bonus from sasuser.payrollmaster where salary>75000 order by salary desc;
Column Modifier
|
Specifies...
|
Example
|
---|---|---|
LABEL=
|
the label to be displayed
for the column
|
select hiredate label='Date of Hire' |
FORMAT=
|
the format used to display
column data
|
select hiredate format=date9. |
proc sql outobs=15; select empid label='Employee ID', jobcode label='Job Code', salary, salary * .10 as Bonus from sasuser.payrollmaster where salary>75000 order by salary desc;
proc sql outobs=15;
select empid label='Employee ID',
jobcode label='Job Code',
salary,
salary * .10 as Bonus
format=dollar12.2
from sasuser.payrollmaster
where salary>75000
order by salary desc;
proc sql outobs=15; title 'Current Bonus Information'; title2 'Employees with Salaries > $75,000'; select empid label='Employee ID', jobcode label='Job Code', salary, salary * .10 as Bonus format=dollar12.2 from sasuser.payrollmaster where salary>75000 order by salary desc;
proc sql outobs=15;
title 'Current Bonus Information';
title2 'Employees with Salaries > $75,000';
select empid label='Employee ID',
jobcode label='Job Code',
salary,
'bonus is:',
salary * .10 format=dollar12.2
from sasuser.payrollmaster
where salary>75000
order by salary desc;
bonus is
: has
been added between Salary and Bonus.
as
Bonus
has been removed from the last line of the SELECT
clause. Now that the character constant has been added, the column
alias Bonus is no longer needed.