Excluding queue in RT SQL

Hi all,
Just a quick question, and one I feel like I should know. In RT’s
implementation of SQL, how do I specify a queue; name or ID?

We have a cron job that runs, using SQL to search for tickets. I’m being
asked to exclude a specific queue from this search. Do I need to use “queue
<> ‘queue name’” or “queue <> 7”? Thanks.

Alex Hall
Automatic Distributors, IT department
ahall@autodist.com

Hey Alex,

Hi all,
Just a quick question, and one I feel like I should know. In RT’s
implementation of SQL, how do I specify a queue; name or ID?

Just a point of clarification: RT has something called TicketSQL and
while “SQL” is in its name, it is not SQL.

That being said, you want the queue’s name.

We have a cron job that runs, using SQL to search for tickets. I’m being
asked to exclude a specific queue from this search. Do I need to use “queue
<> ‘queue name’” or “queue <> 7”? Thanks.

I would build some of the query with the search builder:

Search -> Tickets -> New Search

Add a few predicates to your search and then click Advanced. You’ll
see exactly what TicketSQL RT uses.

-m