Hi all. I want to do a query with ObjectCustomFieldValues and Tickets. The different queries run separately, but I don't know how I must link them.
The queries are next: 1) select id,CustomField,Content from ObjectCustomFieldValues where CustomField=2; 2) Select q.Name, count(t.id), Status from Tickets t, Queues q WHERE t.Queue=q.id AND (t.Queue=3 OR t.Queue=6) AND (Status='Resolved' OR Status!='Resolved') GROUP BY q.Name,Status ORDER BY q.Name, Status; I have tried to use the "Principals" table, but always the result of next query (Select PrincipalType from Principals group by PrincipalType) is "Group" or "User". Any idea? Thanks a lot!! Best regards, ALBERTO VILLANUEVA DEL VAL Consultor ____________________________________________ Altran Technologies ParqueEmpresarial Las Mercedes, Edificio 1 C/ Campezo, 1. 28022 Madrid Tel: + 34 91 744 46 00 - Ext: 2205 Fax: + 34 91 415 24 57 www.altran.es _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com