You can use
the INSERT statement to add logical records to an
ADABAS file or the DELETE statement to remove
logical records. In the following example, the logical record containing
the CUSTOMER value 15432147 is deleted by using the CUSTOMERS DDM.
The SELECT statement then displays the VLIB.USACUST data in the following
output, ordering them again by the CUSTOMER data field.
delete from vlib.usacust
where custnum='15432147';
title 'Logical Record Deleted from
CUSTOMERS';
select custnum, state, name, limit, signatur
from vlib.usacust;
Results of Deleting Data with the DELETE 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 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
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
CAUTION:
Always
use the WHERE clause in a DELETE statement.
If you omit the WHERE clause
from a DELETE statement, you delete all the data in the
ADABAS file that is accessed by the view descriptor.
For more information
about SAS SQL procedure, see the
Base SAS Procedures Guide.