>This is exactly what I did, changed OrderNumber to CompanyID, I am proud of myself that I figured that much <g>. Now I found that I get error opening the tables, like data is corrupted. Probably because the data is maintained by a Clipper application. VFP 6 was opening the tables without problems but VFP 9 is more strict. Strange though, I can USE the table but SQL Select reports error. I will have to deal with it somehow. Thank you very much for your help.
What error do you get? Do you get it if you open tables with USE before running the query?
--sb--