0
votes

I have a report contains 2 command objects.But as per my requirement i need to pass one query columns as parameters to another query. I have max time and min time in one query.It should passed as from time and to time parameters to another query. Like below

1st Query:

where from time =(min time of 2nd query) and to time =(max time of 2nd query).

How can we do this,any other way like sub reports.Any ideas would be appreciated .Please suggest me

1

1 Answers

0
votes

Suppose your second query is

select C
from   T

then get rid of the second query and make the first query say

where from_time = (select min(C) from T)
  and to_time   = (select max(C) from T)