USoft Rule Language Examples: Delete Statements

Previous Next

See Also

The following examples illustrate the use of the USoft Rule Language REMOVE ALL and FOR WHICH keywords in delete statements.

 

 

USoft Rule Language

SQL Equivalent

REMOVE ALL        drivers

FOR WHICH        age > 23

delete from        driver

where                age < 23

 

 

DELETE statements with subquery

 

USoft Rule Language

SQL Equivalent

REMOVE ALL          drivers d

FOR WHICH exists

(

 select        ''

 from                contract c

 ,                business_party b

 relate        b "PAYS FOR" c

 where                b.id = d.id

 and                c.paid = 'N'

)

delete from                driver d

where exists

(

 select        ''

 from                contract c

 ,                business_party b

 relate        b "PAYS FOR" c

 where                b.id = d.id

 and                c.paid = 'N'

)