Formating numbers

  • ok.

    I am not sure but there might be a way to use that in SQL

    google SQL extended stored procedures

    however this is a deprecated future and will not be available after 2008 version I think so thread softly 🙂

  • Sounds like you're back to trying to write a formatting function. You could save yourself a lot of time by just skipping that and spend more time on passing the correct datatypes for the sake of performance.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden (11/7/2011)


    You could save yourself a lot of time by just skipping that and spend more time on passing the correct datatypes for the sake of performance.

    can you clarify this please

  • It's pretty much as I stated... instead of formatting data, pass the data as the correct data type.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Please post the valid formatting chars the existing function accepts and the expected output from sample formats.

    #0.00, ### ##0.00

    What specifically does that mean? I'm guessing the # is zero-suppressed and the 0 is not, i.e., print 0.56 not 00.56, but need to be sure to write code.

    Are there other formatting chars or options you need to also have function the way they did before? If so, what are they and what is the required output for each?

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 5 posts - 16 through 19 (of 19 total)

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