>>Here is my code:
>
>>where substr(dtoc(tabletest1.order_date),7,2) = '99'
>>
>
>Be careful with that statement. Depending on SET('DATE'), (short, for example) you may receive 0 for today's date. Also, avoid unnecessary conversion statements in your SQL as they will slow the result as a linear (geometric, possibly?) function of tabletest1's record count. In this case, you might try "WHERE tabletest1.order_date < ?vp_dBaseLine" and make sure to have an index on order_date to speed up selection. Then, set vp_dBaseLine programmatically or based on UI input.
-------
Jason,
ok, I will try it...:)