AfmViewSetSqlRest
AfmViewSetSqlRest
Syntax
(AfmViewSetSqlRest strTableGroup strSqlExpr)
Comments
Sets the SQL restriction of the view.
strTableGroup s the name of the table-group to which the restriction should apply. For instance, in a "Rooms and Standards" view, the assigned table-group is "rm".
strSqlExpr is the SQL WHERE clause that should be applied to that table-group, e.g. "rm.area < 75.0".
SQL
To use SQL in this function, use the keyword "SQL" instead of a table.field pair as is shown in the following two examples:
(AfmViewSetSqlRest (list (list "rm.rm_cat" "=" "OFFICE") (list "SQL" "(rm.cap_em - rm.count_em) > 0.0") ) )
or
(AfmViewSetSqlRest (list (list "SQL" "(rm.rm_cat = 'OFFICE') AND (rm.cap_em - rm.count_em) = 0.0") ) )