![]() Chapter Contents |
![]() Previous |
![]() Next |
| UPDATE |
| Optional statement | |
| Applies to: | access descriptor or view descriptor |
| Not allowed with: | ASSIGN, RESET, SELECT, UNIQUE |
| Syntax | |
| Details | |
| Updating access descriptors | |
| Updating view descriptors | |
| Examples |
Syntax |
| UPDATE libref.descriptor-name.ACCESS|VIEW ; |
| Details |
The descriptor is a name in three parts separated by periods (.):
You can use UPDATE and CREATE in the same PROC ACCESS block.
| Updating access descriptors |
The order of statements in an UPDATE block is as follows:
| Updating view descriptors |
| Examples |
The following example upates an existing access descriptor named ADLIB.PRODUCT:
libname adlib 'c:\sasdata';
proc access dbms=wk4;
update adlib.product.access;
path=c:\lotus\specprod.wk4;
rename productid prodid
fibername fiber;
format productid 4.
weight e16.9
fibersize e20.13
width e16.9;
run;
The following example updates the access descriptor
EMPLOY, located in
c:\sasdata, for the spreadsheet named
c:\excel\employ.xls and updates the view descriptor for EMPLOY named
EMP1204, located in
c:\sasviews:
libname adlib 'c:\sasdata';
libname vlib 'c:\sasviews';
proc access dbms=xls;
update adlib.employ.access;
path='c:\excel\employ.xls';
list all;
update vlib.emp1204.view;
format empid 6.
salary dollar12.2
jobcode 5.
hiredate datetime9.
birthdate datetime9.;
subset where jobcode=1204;
run;
The following example updates a second view descriptor
that is based on EMPLOY named BDAYS. It is also located in
c:\sasviews. When you update a view, it is not
necessary to specify the access descriptor (using ACCDESC=) in the PROC ACCESS
statement. Note that FORMAT can be used because the access descriptor EMPLOY
was created with ASSIGN=NO.
libname vlib 'c:\sasviews';
proc access dbms=xls;
update vlib.bdays.view;
format empid 6.
birthdate datetime7.;
run;
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.