• andell_ramsay (12/15/2010)


    Jeff -

    How then would one be able to sort chronologically on this field? Is there a way to keep the format while changing the data type to a numeric format?

    To answer the questions above in order... You can't and yes. 😛

    See the following SQL Spackle article for one way to do this...

    http://www.sqlservercentral.com/articles/T-SQL/71511/

    --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)