Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mysql returns Char for COUNT()
Message
De
12/02/2010 13:55:52
 
 
À
12/02/2010 12:50:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01448957
Message ID:
01448965
Vues:
47
>
>
>lcSql = "SELECT substring(myField,1,3) AS myField,  COUNT(*) AS totItems " +;
>           "   FROM myTable"+;
>           "  GROUP BY substr(myField,1,3)"
>
>=SQLEXEC(lnConHandle,lcSql,"myCursor")
>
>? TYPE('myCursor.totItems') -----> "C"
>
>Does anybody know why this happens and if there are any other aggregate functions which return an ummmmmmmmm "unexpected" data type?
>
>FWIW - I got a numeric value by substituting SUM(1) for COUNT(*) but I'm still curious about this.
>
>Thanks to all........Rich

When I saw Sergey's response about BIGINT I looked at CAST(). My results mirrored Christian's (would have saved a little time if I had read his thread first < g >).

I can live with extra decimal digits.

Many thanks to both of you.

........Rich
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform