SQLWhereItems property |
Applies to
TIB_Dataset
Declaration
Property SQLWhereItems : TStrings;
Description
This property is very useful for having IBO handle the parsing of items to
be added to the WHERE clause of the SELECT statement being constructed. It is
only valid to add items to this string list during the OnPrepareSQL phase.
Each entry must be a unit that returns a boolean true or false and be valid
SQL syntax. It is possible to use parenthesis which will provide nesting of
items. By default all items are AND'd together but the OR operator can be
placed by iteslf as an item and it will serve as an operator.
Here are some sample uses of this property:
SQLWhereItems.Add( '(' ); SQLWhereItems.Add( 'MYCOL1 = 100' ); SQLWhereItems.Add( 'OR' ); SQLWhereItems.Add( 'MYCOL1 = 200' ); SQLWhereItems.Add( ')' ); |
SQLWhereItems.Add( '(' ); SQLWhereItems.Add( '(' ); SQLWhereItems.Add( 'MYCOL = 100' ); SQLWhereItems.Add( 'MYCOL = 200' ); SQLWhereItems.Add( ')' ); SQLWhereItems.Add( 'MYCOL = 300' ); SQLWhereItems.Add( ')' ); |