MySql Number Format

karelog
karelog used Ask the Experts™
on
Hello everybody!

I'm making a query in MySql 5.

MySql default decimal separator is the dot (.), However, I need that in my query comes as a decimal separator, a comma (,).

any idea on how to achieve this?

in advance, many thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
UmeshSenior Principal Technical Support Engineer
Top Expert 2009

Commented:

Author

Commented:
I've seen that link in many places.

this is my problem:
Select myDouble FROM myTable;

It brings me:
**************
* myTable *
**************
*      10      *
*      1.1     *
*      10.5   *
**************

I need that that 1.1 and 10.5 be in this format: 1,1 and 10,5
(yes, using comma a decimal separator)


I don't see how the format sentece would help me to achieve that D:
Senior Principal Technical Support Engineer
Top Expert 2009
Commented:
Just use replace function to change dot -> comma

SELECT REPLACE(myDouble, '.', ',') FROM myTable;

Author

Commented:
Thanks ;:D

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial