I had a same problems before but my table was able to divide with any criteria along with biz rules. Of course we can upsizing oracle or ms-sql if we invest more money but I always think vfp is enough for our computing life. I am happy if this code will be helpful for you.
stable=iif(code>10000,"vtable02",iif(code>20000,"vtable03","vtable01"))
SELE &stable
.
.
Have a good day
Stephen
Best regards,
Stephen M. Chi