select * from Table where PK in (select PK AnotherTable)where AnotherTable is a VFPcursor. For my understanding, this isn´t a join, but a sub-query. Thinking that SPT will send a command to be executed by the backend, and your desired SQL-Select would have part executed by the backend, and part by VFP, I can´t see that as something possible.