• yep , a tally table, combined with a dateadd seems to be what you are after.

    I just put together an example, but you'd use your own tally table, and extend out and limit the results as required.

    ;WITH MyCTE([reference],[startdate],[pattern])

    AS

    (

    SELECT 'TestRef-AA',convert(datetime,'09/09/2013 10:45'),'1111111 1111111 111 111 111111 1111'

    )

    SELECT DATEADD(wk,Tally.N,[startdate]) As CalcDate,*

    FROM MyCTE

    CROSS JOIN (SELECT 0 As N UNION ALL SELECT 1 UNION ALL SELECT 2) Tally

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!