Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Selects in VFP8 vs earlier versions
Message
 
 
À
24/03/2003 08:38:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00769193
Message ID:
00769197
Vues:
15
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform