VFP doesn't support derived tables so your select wouldn't work in VFP "as is". However you can split it into two separate selects.
SELECT 'cust' as table, custnum, firstname
FROM cust
UNION ALL
SELECT 'cust_dupe' as table, custnum, firstname
FROM cust_dupe
INTO CURSOR crsTemp
select custnum, firstname
FROM crsTemp
GROUP BY custnum, firstname
HAVING COUNT(*) = 1
>Are all SQL Selects legal in VFP8? If not, is there a list somewhere of what works?
>
>For example, this Select statement that compares data tables, works in SQL 2000 but does not work in VFP6:
>
>select custnum, firstname
>FROM
>(
>SELECT 'cust' as table, custnum, firstname
>FROM cust
>UNION ALL
>SELECT 'cust_dupe' as table, custnum, firstname
>FROM cust_dupe
>)
>GROUP BY custnum, firstname
>HAVING COUNT(*) = 1
>
>Would this work in VFP8?
>
>Thanks in advance.
--sb--