[Rt-users] Help with Reports

phillip phillip at reportstar.net
Mon Apr 19 10:17:08 EDT 2004


I have decided to use my clients company names to sort out my reporting. I 
have created a custom field named company name but the problem is that i get 
see this field on i run the folllowing command :-

SELECT * 
FROM CustomFieldValues;

So how do make sure that i get all the custom field I created.

On Thursday 15 April 2004 10:16 pm, Carl Makin wrote:
> On Thu, 2004-04-15 at 23:00, phillip wrote:
> > Thanks that solves half of my problem so how do I get the requstor name
> > into the report and  and get all the tickets for the whole month?
>
> <sigh>  Missed the requestor bit...
>
> Try this;
>
> SELECT Tickets.id as Id, U2.RealName as Owner, Users.RealName as
> Requestor, Tickets.TimeWorked as TimeWorked, Tickets.Created as Created
> FROM Tickets, Groups, GroupMembers, Users INNER JOIN Users as U2
> ON(Tickets.Owner=U2.Id) WHERE Tickets.Created >= '2004-03-01' and
> Tickets.Created <= '2004-03-31' and Groups.Domain = 'RT::Ticket-Role'
> and Groups.Type='Requestor' and Groups.Instance=Tickets.id and
> Groups.id=GroupMembers.GroupId and GroupMembers.MemberId=Users.Id ORDER
> BY Tickets.Id;
>
> Although I suspect it should only be tried by specially qualified stunt
> DBAs. <grin>
>
>
> Carl.




More information about the rt-users mailing list