fboehlandt
06-10-2009, 06:33 AM
Hi everyone,
I have the following database with two tables named 'Information' and 'Performance'. I would like to run a Union-query to combine the information in the two tables. From the first table I include 'ID' as well as 'Fundname', from the second table I would like to include 'Date', 'FundsManaged', and 'Return'. The primary key for both is 'ID'. The relationship is one-to-many. I have the following SQL-query:
SELECT Information.ID, Information.F1, Performance.Date, Performance.FundsManaged, Performance.Return
FROM Information INNER JOIN Performance ON Information.[ID] = Performance.[ID]
WHERE (((Performance.Date)>#4/1/1998# And (Performance.Date)<#4/1/2008#));
This query works fine. Here comes where I get stuck. I would like to include only time series for the different funds that provide continuous performance records (Field: Performance.Return) for the period betweeen 4/1/1998 and 4/1/2008. Thus, if a given fund has a performance history between, for example, 4/1/2000 and 4/1/2008, the fund should be excluded completely from the query. Can anyone help please?
I have the following database with two tables named 'Information' and 'Performance'. I would like to run a Union-query to combine the information in the two tables. From the first table I include 'ID' as well as 'Fundname', from the second table I would like to include 'Date', 'FundsManaged', and 'Return'. The primary key for both is 'ID'. The relationship is one-to-many. I have the following SQL-query:
SELECT Information.ID, Information.F1, Performance.Date, Performance.FundsManaged, Performance.Return
FROM Information INNER JOIN Performance ON Information.[ID] = Performance.[ID]
WHERE (((Performance.Date)>#4/1/1998# And (Performance.Date)<#4/1/2008#));
This query works fine. Here comes where I get stuck. I would like to include only time series for the different funds that provide continuous performance records (Field: Performance.Return) for the period betweeen 4/1/1998 and 4/1/2008. Thus, if a given fund has a performance history between, for example, 4/1/2000 and 4/1/2008, the fund should be excluded completely from the query. Can anyone help please?