Joel Rosdahl | 6 Aug 2004 10:35
Gravatar

Re: TracReports

Sean Spicer <saspicer@...> writes:

> Is there a way to chain together SQL commands for TracReports --
> What I'd like to do is create a temporary table, pipe the results of
> one select into that table, and then conduct a second select from
> the temporary table...I'm not able to do it just by writing the SQL
> commands into the TracReports window, but perhaps someone else can
> give me a hand...
>
> Oh, and if anyone wants to know why you do such a crazy thing, it's
> so that I can track how many tickets were opened or closed against a
> particular version or milestone, including those that may have been
> moved to a previous or future version.
>
> Any help would be great!

I'm not sure I understand what you want, but to use a query result in
another query in SQL, you can do like this:

    select some, fields
    from (select some, other, fields from some_table where foo = ...)
    where bar = ...

(By the way: Please don't send a new mail to the list by replying to
another list mail and erasing the subject and body. There are still
references (in the form of In-Reply-To and References headers) to the
mail you replied to, which messes up the mail threading in mail
programs that support this. Your mail will end up sorted in the thread
of the mail you replied to, not as the root of a new thread as it
should.)

        Regards,
        Joel

--

-- 
Joel Rosdahl <joel@...>
Key BB845E97; fingerprint 9F4B D780 6EF4 5700 778D  8B22 0064 F9FF BB84 5E97

Gmane