• L' Eomot Inversé (10/14/2012)


    ChrisM@home (10/14/2012)


    Jeff Moden (10/12/2012)


    Cadavre (10/12/2012)


    If you insist on doing it in the database layer, it can be achieved like this:

    Check again. OP's desired output doesn't actually have a comma as a thousands separator. It would appear that the OP wants a comma only after the 2nd character of the integer part of each number.

    Lakhs instead of thousands.

    Maybe, but if so there seems to be also a rule that for amounts less than 1 lakh a comma eparates thousands: this is shown by the last number, where the sated form is 56,178.9223.

    Fair point, Tom, but if you examine all of those "output example" figures and count the number of digits between the comma and the decimal point, this is what you get:

    56,178.9223 -- 3

    58,50932.9483-- 5

    84,76619.278-- 5

    73,79686.3091-- 5

    82,10285.1655-- 5

    85,50831.8702-- 5

    10,749269.374-- 6

    18,220131.5285-- 6

    16,787382.3141-- 6

    14,170982.5455-- 6

    17,969750.9487-- 6

    13,458206.13-- 6

    10,827327.4904-- 6

    I reckon the intent is lakh, and the rest is down to sloppiness. But it's a guess.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]