Larry,
Could you show me exactly how you would use a UNION to do that? I can't figure out the syntax.
Mike
 
-------------- Original message from Lawrence Lustig <[email protected]>: --------------

<<
   SET VAR vWhereClause = +

   ('Control# LIKE'&.vSearchString&'OR ' + +

    'DistName LIKE'&.vSearchString&'OR ' + +

    'ShipState LIKE'&.vSearchString)

>>


The ORs make this non-optimizable. However, you can rewrite the query to use UNION to combine the results of three separate queries and, if you index Control#, DistName, and ShipState, you will get an optimized search.


--

Larry


Reply via email to