Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Annoying result from MySQL COUNT(*)
Message
 
 
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 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Application:
Desktop
Divers
Thread ID:
01386273
Message ID:
01386308
Vues:
73
Yes of course, but in the view it shows with 2 decimals if I use DECIMAL(9,0). When I use DECIMAL(9,1) it shows only one decimal. It's strange, but a much better improvement to the character result that I had to use initially!

>Did you try CAST(... AS DECIMAL(9,0))?
>
>>In MySQL Cast can be one of the following types:
>>Binary
>>Char
>>Date
>>Datetime
>>Decimal
>>Signed integer
>>Time
>>Unsigned integer
>>
>>I have tried it before, but if I use signed or unsigned integer, it creates a character result. But now that you mention it I checked and using Decimal does result in a numeric output. I never thought of using Decimal, have to check what they mean with that. Strangely enough, it always displays two decimal points, but for my calculations that will work.
Christian Isberner
Software Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform