MAKE SURE THAT

Previous Next

The USoft Rule Language MAKE SURE THAT clause corresponds to the SQL SET clause. The equivalent of the SQL UPDATE clause is introduced by FOR.

Examples

USoft Rule Language

SQL Equivalent

FOR drivers

MAKE SURE THAT   status = 'Accredited'

WHERE            age > 23

OR               license_date > sysdate  -  (3 * 365)

UPDATE   driver

SET      status = 'Accredited'

WHERE    age > 23

OR       license_date > sysdate - (3 * 365) 

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