ALLBASE/SQL Reference Manual (36216-90216)

Chapter 10 383
SQL Statements A - D
DELETE WHERE CURRENT
table or you must have DBA authority.
If you specify the name of a view, you must have DELETE or OWNER authority for that
view or you must have DBA authority. Also, the owner of the view must have DELETE or
OWNER authority with respect to the view's base tables, or the owner must have DBA
authority.
Example
The active set of this cursor will contain values for the OrderNumber stored in :OrdNum.
DECLARE DeleteItemsCursor CURSOR FOR
SELECT ItemNumber,OrderQty FROM PurchDB.OrderItems
WHERE OrderNumber = :OrdNum
Statements setting up a FETCH-DELETE WHERE CURRENT loop appear here.
OPEN DeleteItemsCursor
Statements for displaying values and requesting whether the user wants to delete the
associated row go here.
FETCH DeleteItemsCursor INTO :Lin :Linnul, :Orq :Orqnul
DELETE FROM PurchDB.OrderItems
WHERE CURRENT OF DeleteItemsCursor
.
.
.
CLOSE DeleteItemsCursor