[string] [float] string to float en sql
Bonjour,
J'ai une petite question.
Je voulais savoir dans quelle base de donn�es on peut caster un string en float.
Car en ce moment, j'utilise mysql et je n'y arrive pas.
la fonction cast("1,23" AS FLOAT) ne s'execute pas.
En r�sum� je voudrais savoir si il �tait possible de faire la conversion string to float sur mysql ?
Et si non quelle base le permet ?
Merci d'avance.
@++
Re: [string] [float] string to float en sql
Citation:
Envoy� par chickenhuchette
En r�sum� je voudrais savoir si il �tait possible de faire la conversion string to float sur mysql ?
Apparemment pas :
Citation:
CAST(expr AS type) , CONVERT(expr,type) , CONVERT(expr USING transcoding_name)
The CAST() and CONVERT() functions can be used to take a value of one type and produce a value of another type.
The type can be one of the following values:
* BINARY
* CHAR
* DATE
* DATETIME
* SIGNED [INTEGER]
* TIME
* UNSIGNED [INTEGER]
Essaie peut-�tre comme �a :
Code:
SELECT '1.23' + 0.0
mais je n'y crois pas trop...
[edit] en fait si �a fonctionne ;) [/edit]