<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4915.500" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=623440220-10102002>Hi
Michele,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=623440220-10102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=623440220-10102002>I am
trying to write a query that will count the total number of tickets, in a given
queue that are OPEN/STALLED/RESOLVED and have a specific
keyword.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=623440220-10102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=623440220-10102002>I have
the following query so far and the numbers are off. The total count I get
for the query below does not tally up with the number I have on the WebUI for
that queue (e.g results for OPEN count below for this queue-does not match what
is on the WebUI as OPEN for that queue) Any ideas:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=623440220-10102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=623440220-10102002>SELECT
COUNT(T.NewValue) FROM Transactions T, Queues Q WHERE Q.id='18' AND
T.NewValue='new';</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=623440220-10102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=623440220-10102002>Thanks
for all the help</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=623440220-10102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=623440220-10102002>Hillary</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Michele Hershey
[mailto:mhershey@mhpcc.edu]<BR><B>Sent:</B> Wednesday, October 09, 2002 8:42
PM<BR><B>To:</B> Gororo, Hillary<BR><B>Subject:</B> Re: [rt-users] SQL Reports
- Keywords<BR><BR></FONT></DIV>Check this out...it may do it! <BR>=======
<P>mysql> select * from <FONT color=#ff0000>ObjectKeywords</FONT> where
objectid =288; <BR>+-----+---------+---------------+------------+----------+
<BR>| id | Keyword | KeywordSelect | ObjectType | ObjectId |
<BR>+-----+---------+---------------+------------+----------+ <BR>| 568
| <FONT color=#3366ff>15</FONT>
| 4 |
Ticket | 288 | <BR>| 569
| 21
| 5 |
Ticket | 288 | <BR>| 570
| 47
| 6 |
Ticket | 288 |
<BR>+-----+---------+---------------+------------+----------+ <BR>3 rows in
set (0.00 sec)
<P>mysql> select * from <FONT color=#ff0000>Keywords </FONT>where id = 15;
<BR>+----+---------+-------------+--------+----------+ <BR>| id |
Name | Description | Parent | Disabled |
<BR>+----+---------+-------------+--------+----------+ <BR>| <FONT
color=#3366ff>15 </FONT>| 0 - Low |
NULL | 14
| 0 |
<BR>+----+---------+-------------+--------+----------+ <BR>1 row in set (0.00
sec)
<P>mysql> <BR> <BR>
<P>"Gororo, Hillary" wrote:
<BLOCKQUOTE TYPE="CITE">
<P><FONT size=-1>Michele,</FONT>
<P><FONT size=-1>Any luck on this. I am trying to run a report that
will count the total number of tickets in a queue by Keyword name. I
can't seem to see the connection btw tickets and keywords in mysql. Do
you have any ideas on this.</FONT>
<P><FONT size=-1>Thanks</FONT> <BR><FONT size=-1>Hillary</FONT>
<P><FONT size=-1>-----Original Message-----</FONT> <BR><FONT size=-1>From:
Michele Hershey [<A
href="mailto:mhershey@mhpcc.edu">mailto:mhershey@mhpcc.edu</A>]</FONT>
<BR><FONT size=-1>Sent: Thursday, September 05, 2002 9:56 PM</FONT>
<BR><FONT size=-1>To: RT</FONT> <BR><FONT size=-1>Subject: [rt-users] SQL
Reports - Keywords</FONT>
<P><FONT size=-1>I'm just starting to write SQL reports for an RT system
that will become</FONT> <BR><FONT size=-1>LIVE soon.</FONT>
<P><FONT size=-1>I'm stumped. I know a query can be done on Keywords
(it's available via</FONT> <BR><FONT size=-1>the SEARCH function),but I'm
failing to see the connection between the</FONT> <BR><FONT size=-1>tickets
and keywords to create a monthly report via SQL by reviewing the</FONT>
<BR><FONT size=-1>tables.</FONT>
<P><FONT size=-1>Please point me in the right direction of help or
documenation.</FONT>
<P><FONT size=-1>Thanks,</FONT> <BR><FONT size=-1>Michele</FONT>
<P><FONT size=-1> "The information transmitted is intended only for the
person or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or
other use of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from all computers."</FONT>
<BR> </P></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
<BR>
<BR>
<P><FONT SIZE=2 FACE="Arial"> "The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers." </FONT></P>
<BR>
<BR>