• romah (3/14/2013)


    I found in other forums that "cross apply" only works if the compatibility_level is greater than 80.

    When I checked the compatibility_level of our database, it's 80.

    SELECT compatibility_level

    FROM sys.databases WHERE name = 'database_name'

    I think Eugene's solution works in greater compatibility-level but I don't have permission to change it.

    Thanks once again Eugene !:-)

    NP. I am, however, concerned that Eugene is correct about the future. Please post your fnSplit function (ironically named) and lets see if we can make this code a bit more bullte proof for the future scalability..

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