Hello,

I am trying to make an export of all tickets in a queue using an
SQL-query. I've succeeded in creating a query including all custom
fields (see below).

In addition I also need all the comments with the tickets. Is there a  
way to do this and put them in a .csv or excell?

Greetings, Floor Verschure

////////////////////////////////////////////////////////////////////////

   SELECT t.id, t.subject, t.priority, t.created, t.status,
t.resolved, c37.content AS 'Eneco Ref. Nr.',c40.content AS 'Aspective
Ref. Nr.' , c38.content AS 'Downtime',c39.content AS 'Workaround'

FROM Tickets t

LEFT JOIN TicketCustomFieldValues c38 ON (t.id = c38.ticket AND
c38.customfield = 38)
LEFT JOIN TicketCustomFieldValues c37 ON (t.id = c37.ticket AND
c37.customfield = 37)
LEFT JOIN TicketCustomFieldValues c39 ON (t.id = c39.ticket AND
c39.customfield = 39)
LEFT JOIN TicketCustomFieldValues c40 ON (t.id = c40.ticket AND
c40.customfield = 40)

WHERE t.Queue=44

///////////////////////////////////////////////////////////////////////

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to