Showing posts with label ticket. Show all posts
Showing posts with label ticket. Show all posts

Friday, February 19, 2016

Fetching last 6 months data in Maximo using SQL Server with output in a specific language

Below is one of the best ways to find number of tickets created in last 6 months in Maximo using SQL Server database in a specific language.
here i am using Portugese as lanuage in which my output should be

Query is self explanatory


select CASE month
WHEN  'January' THEN 'Janeiro de'
WHEN  'February' THEN 'Fevereiro'
WHEN  'March' THEN 'Março de'
WHEN  'April' THEN 'Abril'
WHEN  'May' THEN 'Maio'
WHEN  'June' THEN 'Junho de'
WHEN  'July' THEN 'Julho'
WHEN  'August' THEN 'Agosto'
WHEN  'September' THEN 'Setembro de'
WHEN  'October' THEN 'Outubro'
WHEN  'November' THEN 'Novembro de'
  ELSE 'Dezembro de'
END month,countoftickets from ( SELECT DATENAME(MONTH,DATEADD(month, -5, GETDATE())) month,COUNT(*) AS countoftickets , 1 as fs FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -5, GETDATE())) union  SELECT DATENAME(MONTH,DATEADD(month, -4, GETDATE())) month,COUNT(*) AS countoftickets , 2 as fs FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -4, GETDATE())) union  SELECT DATENAME(MONTH,DATEADD(month, -3, GETDATE())) month,COUNT(*) AS countoftickets , 3 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -3, GETDATE())) union  SELECT DATENAME(MONTH,DATEADD(month, -2, GETDATE())) month,COUNT(*) AS countoftickets , 4 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -2, GETDATE())) union  SELECT DATENAME(MONTH,DATEADD(month, -1, GETDATE())) month,COUNT(*) AS countoftickets , 5 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -1, GETDATE())) union  SELECT DATENAME(MONTH,DATEADD(month, 0, GETDATE())) month,COUNT(*) AS countoftickets , 6 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, 0, GETDATE()))  ) a1  order by fs

output:

month countoftickets
Setembro de 0
Outubro 0
Novembro de 0
Dezembro de 22
Janeiro de 57
Fevereiro 34






----------------------------------------------------------------------------
All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Thursday, February 18, 2016

Displaying data ticket count with in SLA by priority in MAXIMO using SQL Server.

Below query can be used for displaying data ticket count with in SLA by priority in MAXIMO using SQL Server.

Data would be displayed like below

Priority          Count Status
1                 1        SLA OK
1                   2        SLA NOT OK
3                  15      SLA OK


Query :

select internalpriority,count(*) count, 'SLA NOT OK'  status  from TICKET where targetcontactdate is not null and actualcontactdate is not null and targetcontactdate - actualcontactdate <0 -="" actualcontactdate="" and="" by="" count="" from="" group="" internalpriority="" is="" nbsp="" not="" null="" ok="" select="" status="" targetcontactdate="" ticket="" union="" where="">=0 group by internalpriority










----------------------------------------------------------------------------
All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Display Number of tickets solved with in SLA by person in Maximo .. SQL Server

Below query can be used for displaying data solved with in SLA by person in MAXIMO using SQL Server.

Data would be displayed like below

AffectedPerson Count Status
ABC                   1        SLA OK
ABC                   2        SLA NOT OK
XYZ                   15      SLA OK


Query :

select affectedperson,count(*) count, 'SLA NOT OK'  status  from TICKET where targetcontactdate is not null and actualcontactdate is not null and targetcontactdate - actualcontactdate <0 -="" actualcontactdate="" affectedperson="" and="" by="" count="" from="" group="" is="" nbsp="" not="" null="" ok="" select="" status="" targetcontactdate="" ticket="" union="" where="">=0 group by affectedperson







----------------------------------------------------------------------------
All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Thursday, April 24, 2008

Smart answer 2

A flight attendant was stationed at the departure gate to check tickets.
Asa man approached, she extended her hand for the ticket and he opened histrench
coat and flashed her.Without blinking an eyelid she said, 'Sir, I need to see
your ticket notyour stub.'