[rt-users] excluding queue in RT SQL

Matt Zagrabelny mzagrabe at d.umn.edu
Thu Feb 9 10:47:59 EST 2017

Hey Alex,

On Thu, Feb 9, 2017 at 9:02 AM, Alex Hall <ahall at autodist.com> wrote:
> 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.


More information about the rt-users mailing list