repeat results without loops, MSSQL2005 Express

  • hello everybody, new here and this is my first question

    I have a table contains: Name, Id, joinDate

    My question is that:

    I need a query to list all years between current date and joinDate, as the following as instance:

    Id------------------------Name----------------------empDate

    1--------------------------John-----------------------6-8-2020

    result:

    1--------------------------John-----------------------6-8-2021

    1--------------------------John-----------------------6-8-2022

    1--------------------------John-----------------------6-8-2023

    1--------------------------John-----------------------6-8-2024

    1--------------------------John-----------------------6-8-2025

    Thanks in advance.

Viewing post 1 (of 1 total)

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