Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper syntax with ODBC with sub select
Message
De
04/03/2006 14:50:51
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Proper syntax with ODBC with sub select
Divers
Thread ID:
01101514
Message ID:
01101514
Vues:
73
This select works well in VFP mode:
IF NOT loDMA.SQLExec('SELECT Country.Numero,Country.'+gcReturnTitle+' AS Title,Temp.SchoolTotal FROM '+;
 '(SELECT School.NoCountry,COUNT(*) AS SchoolTotal FROM School WHERE School.Status=2 GROUP BY 1) Temp '+;
 'INNER JOIN Country ON Temp.NoCountry=Country.Numero '+;
 'ORDER BY 2')
   RETURN loDMA.cHtml
ENDIF
But, doing this same sub select in ODBC, generates a result of -1. There seems to be some incompability in the syntax in this SQL. Anyone would know how I can adjust to have something generic?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform