• vigneshkumart50 (5/2/2014)


    the datatype is decimal(10,4)

    Current Value:

    12,589.25

    Expected Output:

    12,589

    Always truncating, never rounding? What about 12,589.99?

    Your expected output omits a '$' character present in your first post, do you want this or not?

    “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