downunder
February 24th, 2006, 06:52 PM
I have an unusual report to create and need some ideas on how to go about creating it.The tables are set out in the following way.
Table 1 contains a single row such as this
|Value1 | Value2 |String|
Table 2 contains multiple records that contains a number of fields per record
The idea of the report is to present the rows of Table 2 where the ID of the record matches Value1 OR Value2. As Table2 contains time stamps as well a time filter option is also required.
The SQL query would resemble something like this
Select * from Table2 where (Table2.Time>={TimeStart} AND Table2.Time < {TimeEnd}) AND (Table2.ID = Table1.Value1 OR Table2.ID= Value2)
I can't think of a way of creating this report. If I link Value1 and Value2 in Table1 to the ID in Table 2 get an AND condition instead of an OR.
Any ideas would be appeciated
Tony.
Table 1 contains a single row such as this
|Value1 | Value2 |String|
Table 2 contains multiple records that contains a number of fields per record
The idea of the report is to present the rows of Table 2 where the ID of the record matches Value1 OR Value2. As Table2 contains time stamps as well a time filter option is also required.
The SQL query would resemble something like this
Select * from Table2 where (Table2.Time>={TimeStart} AND Table2.Time < {TimeEnd}) AND (Table2.ID = Table1.Value1 OR Table2.ID= Value2)
I can't think of a way of creating this report. If I link Value1 and Value2 in Table1 to the ID in Table 2 get an AND condition instead of an OR.
Any ideas would be appeciated
Tony.