Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Selects in VFP8 vs earlier versions
Message
 
 
To
24/03/2003 08:38:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00769193
Message ID:
00769197
Views:
16
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform