Adding comma separator to INT datatype

  • Can't help but post Lowell's handywork.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • ...

    I am just going from what my Europe users have complained all along: The invoices/reports coming out of the "american" system when the currency is Euros, are difficult to read because of the decimal notation.

    But thanks anyways.

    I've lived and worked in Europe almost whole my life, and I never seen numbers formatted with dots!

    Also I've worked with users around the world, and I never heard anyone wanting such format.

    Europeans (as every one else I ever seen and worked with) use dot as decimal point and comma as thousand separator.

    Check Excel. You cannot even create a format which uses dot's as thousand separator. Can you image what kind of response MS would have it was really required.

    What I can say, you have very strange European users:hehe:

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • johnnycash (1/31/2013)


    Countries where a comma "," is used to mark the radix point include:

    ...South Africa...

    Wrong.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • Sean Pearce (2/1/2013)


    johnnycash (1/31/2013)


    Countries where a comma "," is used to mark the radix point include:

    ...South Africa...

    Wrong.

    Abrupt! How about a source?

    β€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • ChrisM@Work (2/1/2013)


    Sean Pearce (2/1/2013)


    johnnycash (1/31/2013)


    Countries where a comma "," is used to mark the radix point include:

    ...South Africa...

    Wrong.

    Abrupt! How about a source?

    Thanks, I failed at Google and hoped everyone would just take my word for it.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • Thanks, I failed at Google and hoped everyone would just take my word for it.

    Not in this forum! πŸ˜‰

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • Well, hopefully people will take my word for it...

    We used to use , as the decimal marker, but that practice stopped many years ago (while I was still at school).

    Numbers in South Africa are written as 123,456,789.00 or 123 456 789.00

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • johnnycash (1/30/2013)


    Hello to all gurus here!

    Please excuse the dumbness of this question, but if I have an INT value of 999999 and want to display it formatted with the thousand separator of my choice; which could be either the US standard of a comma "999,999"or the European standard of a dot "999.999"; how do I go about it?

    Any direction/help provided will be highly appreciated!

    Thanks!

    As others have said do the formatting in the client not in the database. A properly written client application will use the localisation settings of your OS to display data in the appropriate format for the user's location and so someone in the UK, US Germany or most of Europe will see 999,999 whilst someone in France (I think) may see 999.999, someone in Australia may see 999 999 without you needing to worry about it.

Viewing 8 posts - 16 through 22 (of 22 total)

You must be logged in to reply to this topic. Login to reply