Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL error from VFP6 to VFP9
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01000858
Message ID:
01000864
Vues:
19
>SELECT colltemp.*,COUNT(ctemp_name) AS r_count FROM colltemp ;
> HAVING r_count > 0 GROUP BY ctemp_name INTO CURSOR tmpQuery
>
>Went from VFP6 to VFP9 and now I am getting "Group by clause is invalid or missing"
>
>Anyone know what is wrong?
>
>Brenda

Brenda,
SQL Behavior has been changed since VFP 7, espacialy for GROUP BY cvlause. Now GROUP BY must contain ALL non agragated fields in SELECT clause, to make this SELECT works you must do:
old_seb = SET("ENGINEBEHAVIOR")
SET ENGINEBEHAVIOR 70 && BTW See the help for this command
SELECT colltemp.*,COUNT(ctemp_name) AS r_count FROM colltemp ;
       HAVING r_count > 0 GROUP BY ctemp_name INTO CURSOR tmpQuery
SET ENGINEBEHAVIOR old_seb
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform