USoft Rule Language Examples: Update Statements

Previous Next

The following examples illustrate the use of the USoft Rule Language MAKE SURE THAT keyword in an update statement, as used for corrective constraints.

NOTE: In USoft Rule Language, the first conditional clause of the main statement is introduced by WHERE.

USoft Rule Language

SQL Equivalent

FOR      driver
MAKE SURE THAT
         status = 'Accredited'
WHERE    age > 23

UPDATE      driver
SET         status = 'Accredited'
WHERE       age > 23

UPDATE statement with subquery:

USoft Rule Language

SQL Equivalent

FOR      drivers
MAKE SURE THAT
         status = 
(
   select      mention
   from        label l
   where       object = 'licensee'
)
WHERE     age > 23

UPDATE      driver
SET         status = 
(
   SELECT   mention
   FROM     label l
   WHERE    object = 'licensee'
)

WHERE       age > 23

 

See Also

USoft Rule Language