Procedure features: |
CREATE
TABLE statement
|
INSERT statement
|
SELECT clause |
FROM clause |
|
Table: |
PROCLIB.PAYLIST
|
This example creates the table PROCLIB.PAYLIST and inserts data into
it.
|
libname proclib 'SAS-library'; |
|
options nodate pageno=1 linesize=80 pagesize=40; |
|
proc sql;
create table proclib.paylist
(IdNum char(4),
Gender char(1),
Jobcode char(3),
Salary num,
Birth num informat=date7.
format=date7.,
Hired num informat=date7.
format=date7.); |
|
insert into proclib.paylist
values('1639','F','TA1',42260,'26JUN70'd,'28JAN91'd)
values('1065','M','ME3',38090,'26JAN54'd,'07JAN92'd)
values('1400','M','ME1',29769.'05NOV67'd,'16OCT90'd) |
|
values('1561','M',null,36514,'30NOV63'd,'07OCT87'd)
values('1221','F','FA3',.,'22SEP63'd,'04OCT94'd); |
|
title 'PROCLIB.PAYLIST Table'; |
|
select *
from proclib.paylist; |
PROCLIB.PAYLIST Table
Id
Num Gender Jobcode Salary Birth Hired
-------------------------------------------------
1639 F TA1 42260 26JUN70 28JAN91
1065 M ME3 38090 26JAN54 07JAN92
1400 M ME1 29769 05NOV67 16OCT90
1561 M 36514 30NOV63 07OCT87
1221 F FA3 . 22SEP63 04OCT94
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.