Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adjusting a SQL to be compliant with ANSI
Message
 
 
À
07/02/2003 16:37:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00750823
Message ID:
00750837
Vues:
23
This message has been marked as the solution to the initial question of the thread.
Michel,

You can use MIN() or MAX() function for fields you don't want to group.
SELECT MAX(SELECT SYS(15,m.euroansi,Ville)) AS City,UPPER(SYS(15,m.euroansi,Ville)) AS City2, ;
>Take the following SQL in VFP 7:
>
>
>SELECT SYS(15,m.euroansi,Ville) AS City,UPPER(SYS(15,m.euroansi,Ville)) AS City2,;
> COUNT(*) AS Compteur FROM Member WHERE Member.NoPays=lnCountry;
> ORDER BY 3 DESCENDING GROUP BY 2 INTO CURSOR Temp
>
>
>How can I make this one compliant with ANSI SQL in VFP 8?
>
>I adapted so far over 20 SQL that I had but this one is really something. Anyone knows how to do it? The problem here is that we have to keep two string values. One is the city without accented characters and the second one is the city in upper case which is one for the group by. Both has to be kept from the original SQL as otherwise we will loose the original state of the city as per its casing. But, as the new ANSI format in VFP 8 doesn't like it, we have to adapt this SQL. If anyone knows how to do it, it'll be appreciated.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform