SQL Server 2008 - Year & Quarter (2012Q1)

  • I have a table with five columns as

    ID Join_Date Join_Qtr End_Date End_Qtr

    1 2014-01-12 2014Q1 2015-05-15 2015Q2

    2 2012-05-01 2014Q2 2017-01-01 2016Q1

    i want to populate a column which is based on difference between (Col2 'Join_Date' - Col4 'End_Date' ) or (col3 'Join_Qtr' - col5 'End_Qtr') result as

    id output

    1 2014Q1, 2014Q2, 2014Q3, 2014Q4, 2015Q1, 2015Q2

    2 2014Q2, 2014Q3, 2014Q4, 2015Q1, 2015Q2,2015Q3, 2015Q4, 2016Q1

    How can i do this ,

    Please suggest me .

    Thanks In advance.

    kkr

Viewing 0 posts

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