Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mysql returns Char for COUNT()
Message
 
 
To
12/02/2010 12:50:04
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01448957
Message ID:
01448961
Views:
56
>
>
>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

See also Annoying result from MySQL COUNT(*) Thread #1386273
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform