Repeat rows on calendar where joined table's start and end date are valid

  • Hello,

    I have a period table (month end calendar). What I would like to do is join another table and have its rows repeated for each period month end it was active for using its start and end date.

    SO period table is like:

    Period Date

    1 2014-01-01

    2 2014-02-01

    3 2014-03-01

    4 2014-04-01

    5 2014-05-01

    Information table is like:

    Issue Expiry Name Type Description

    2014-02-01 2014-04-01 Test FRN Investment

    The result I would like is

    Period Issue Expiry Name Type Description

    2014-02-01 2014-02-01 2014-04-01 Test FRN Investment

    2014-03-01 2014-02-01 2014-04-01 Test FRN Investment

    2014-04-01 2014-02-01 2014-04-01 Test FRN Investment

    The date is the only thing I have to join on.

    Many thanks!

  • hi ya ,

    i worked out how to do it.

    on the join, i used 'between'

    ie. on period between issue date and expiry date.

Viewing 2 posts - 1 through 2 (of 2 total)

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