Just like previously, there are a number of un-answered questions regarding your issue.
Let's try to get those answers FIRST.
One thing you have never told us is what version of Foxpro you are using.
Hopefully it is not one of the OLD non-Visual versions. Those versions have a lesser support for SQL Queries.
If you are not already doing so, I'd recommend that you should be using Visual Foxpro 9 VFP9).
If you have an existing OLD FP application to maintain, OK
But if you are developing something new or learning so that you can developing something new, use the latest version.