Thank you visakh!To repeat your solution:1. create calendar table2. cross join to generate dates for every security3. left join the resulting table with the original table to get cusipsI have done step 1 and 2 and get the following table:AB 01.05.1997AB 02.05.1997AB 03.05.1997 etc.AB 19.06.2001AB 20.06.2001AB 21.06.2001 etc.AB 08.04.2007AB 09.04.2007AB 10.04.2007 etc.AB 31.12.2008AC 04.07.2000AC 05.07.2000 etc.AC 31.12.2008AD 05.08.1999AD 06.08.1999 etc.AD 31.12.2000AD 01.01.2001AD 02.01.2001 etc.AD 31.12.2008
Lets call this table „calendar“.When I now left join “calendar” with the original table(lets call it “original”) with the commandSelect *from calendar c1Left join original o1 on c1.security=o1.security and c1.date=o1.date
I get the following table:AB 01.05.1997 hge678AB 02.05.1997 NullAB 03.05.1997 Null etc. AB 19.06.2001 NullAB 20.06.2001 frr124AB 21.06.2001 Null etc. AB 08.04.2007 NullAB 09.04.2007 ghh898AB 10.04.2007 Null etc. AB 31.12.2008 NullAC 04.07.2000 err231AC 05.07.2000 Null etc. AC 31.12.2008 NullAD 05.08.1999 mkk123AD 06.08.1999 Null etc. AD 31.12.2000 NullAD 01.01.2001 ad312AD 02.01.2001 Null etc. AD 31.12.2008 Null
Do I have to use another join function?Thank you for your help! I really appreciate that!