• Sql Student-446896 (1/25/2013)


    Hi,

    I have a beginning Year and a End year and i have to compute/create a string based on the given years.

    Example:

    Input: BegYr = 2013 and EndYr = 2015

    Output: CombYr = 3/4/5

    How do i do this as script?

    Just double checking... What do you want for a start year of 2009 and and end year of 2021? Read this carefully.

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