Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007
    Posts
    1

    Unanswered: Storage comma instead of dot in numeric types

    Iīd like to know how to storage in MySQL numeric fields with comma intead of dot. Ex.: 1.000,00 instead of 1,000.00

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you cannot store them that way, but you can display them that way...
    Code:
    select replace(
           replace(
           replace(format(yourcolumn,2),'.','~')
                                       ,',','.')
                                       ,'~',',') as foo
      from ...
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    .....thats a presentation issue

    so if you are using raw SQL as your front end (say int heMySQL command line, or a query browser, then Rudy's solution is correct, alternatively you should be using whatever your front end is to format the data as you expect. Normally this sort of issue would be covered by the client workstations internationalisation settings.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •