Browsing and Updating ADABAS Data |
You can use the UPDATE statement to update ADABAS data. Remember that when you reference a view descriptor in a PROC SQL statement, you are not updating the view descriptor, but rather the ADABAS data described by the view descriptor.
The following UPDATE statements update the values described by the logical record that meets the WHERE clause criteria. The SELECT statement then displays the view's output as shown in Results of Updating Data with the UPDATE Statement . The ORDER BY clause in the SELECT statement causes the data to be presented in ascending order by the CUSTOMER data field. (Because you are referencing a view descriptor, you use the SAS variable names for data fields in the UPDATE statement; however, the SQL procedure displays the ADABAS data field names.)
update vlib.usacust set zipcode=27702 where custnum='12345678'; update vlib.usacust set name='DURHAM SCIENTIFIC SUPPLY COMPANY' where custnum='12345678'; update vlib.usacust set firstord='02JAN88'd where custnum='12345678'; update vlib.usacust set limit=5000.00 where custnum='12345678'; update vlib.usacust set signatur='MARC PLOUGHMAN' where custnum='12345678'; update vlib.usacust set branch_2='DURHAM' where custnum='12345678'; title 'Updated ADABAS Data in CUSTOMERS'; select custnum, state, name, limit, signatur from vlib.usacust;
Results of Updating Data with the UPDATE Statement
Updated ADABAS Data in CUSTOMERS CUSTOMER STATE NAME LIMIT SIGNATURE ------------------------------------------------------------------------------------------------- 12345678 NC DURHAM SCIENTIFIC SUPPLY COMPANY 5000.00 MARC PLOUGHMAN 14324742 CA SANTA CLARA VALLEY TECHNOLOGY SPECIALISTS 5000.00 BOB HENSON 14324742 CA SANTA CLARA VALLEY TECHNOLOGY SPECIALISTS 25000.00 KAREN DRESSER 14569877 0 NC PRECISION PRODUCTS 5000.00 JEAN CRANDALL 14569877 NC PRECISION PRODUCTS 100000.00 STEVE BLUNTSEN 14898029 MD UNIVERSITY BIOMEDICAL MATERIALS 10000.00 MASON FOXWORTH 14898029 MD UNIVERSITY BIOMEDICAL MATERIALS 50000.00 DANIEL STEVENS 14898029 MD UNIVERSITY BIOMEDICAL MATERIALS 100000.00 ELIZABETH PATTON 15432147 MI GREAT LAKES LABORATORY EQUIPMENT MANUFACTURERS 10000.00 JACK TREVANE 18543489 TX LONE STAR STATE RESEARCH SUPPLIERS 10000.00 NANCY WALSH 18543489 TX LONE STAR STATE RESEARCH SUPPLIERS 50000.00 TED WHISTLER 18543489 TX LONE STAR STATE RESEARCH SUPPLIERS 100000.00 EVAN MASSEY 19783482 VA TWENTY-FIRST CENTURY MATERIALS 5000.00 PETER THOMAS 19783482 VA TWENTY-FIRST CENTURY MATERIALS 10000.00 LOUIS PICKERING 19876078 CA SAN JOAQUIN SCIENTIFIC AND INDUSTRIAL SUPPLY, INC. 7500.00 EDWARD LOWE 19876078 CA SAN JOAQUIN SCIENTIFIC AND INDUSTRIAL SUPPLY, INC. 25000.00 E.F. JENSEN
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.