SELECT DocId, BoId, BoIdBase, RecType, OrdQty, Gross, StatName, ClientId, BInit,; WeekOf, DStat_Net, DClnt_Net,DLComm, 0.00 AS NumCleared; FROM LineItems; WHERE &cWhere; INTO TABLE LineTempThe Variable 'cWhere' contains:
INLIST(BrokerId, ' ', 'MC') AND BETWEEN(WeekOf, {01/01/1990},{12/31/2004})There are indexes on both BrokerId and WeekOf.