<<
   SET VAR vWhereClause = +
   ('Control#
LIKE'&.vSearchString&'OR ' + +
    'Invoice#
LIKE'&.vSearchString&'OR ' + +
    'OrderNumber
LIKE'&.vSearchString&'OR ' + +
    'ShipZip LIKE'&.vSearchString)
>>

The problem is that the ORs in your search criteria make this a non-optimizable 
search and you'll pay for a full table scan.

To turn this into an optimizable search, you must rewrite it as four SELECT 
statements UNIONed together.
--
Larry

>

Reply via email to