SQL is not hierarchical, you need to JOIN against the milestone table.

--Noah

On Sep 2, 2008, at 8:54 AM, Chris Nelson wrote:

>
> I want the standard All Tickets By Milestone report (3) but sorted  
> by milestone due date.  So, I copied the report
>
> SELECT p.value AS __color__,
>   milestone||' Release' AS __group__,
>   id AS ticket, summary, component, version, t.type AS type,
>   owner, status,
>   time AS created,
>   changetime AS _changetime, description AS _description,
>   reporter AS _reporter
>  FROM ticket t, enum p
>  WHERE status <> 'closed'
> AND p.name = t.priority AND p.type = 'priority'
>  ORDER BY (milestone IS NULL),milestone, p.value, t.type, time
>
> And changed ",milestone" to ",milestone.due" in the ORDER BY  
> clause.  That gives me an error.  So, I create a new report:
>
>  SELECT * FROM milestone
>
> And I see a "Due" column.  But putting "milestone.Due" in the ORDER  
> BY doesn't work either.   What field am I looking for or, more  
> generally, how can I know what fields are available?
>
>                                                   Chris
> --
> Christopher Nelson
> ___________________________________________________
> SIXNET - Innovative. Open. Industrial Data Products.
> PO Box 767, 331 Ushers Road, Clifton Park, NY 12065
> Phone: +1(518)877-5173,  Facsimile: +1(518)877-8346
> E-mail: mailto:[EMAIL PROTECTED]
> Get product details at http://www.sixnetio.com
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to