Olá,
Não consigo migrar a seguinte parte:
[code]–
– Final view structure for view vw_tickets_by_currentyear
/!50001 DROP TABLE IF EXISTS vw_tickets_by_currentyear/;
/!50001 DROP VIEW IF EXISTS vw_tickets_by_currentyear/;
/*!50001 SET @saved_cs_client = @@character_set_client /;
/!50001 SET @saved_cs_results = @@character_set_results /;
/!50001 SET @saved_col_connection = @@collation_connection /;
/!50001 SET character_set_client = utf8 /;
/!50001 SET character_set_results = utf8 /;
/!50001 SET collation_connection = utf8_general_ci /;
/!50001 CREATE ALGORITHM=UNDEFINED /
/!50013 DEFINER=root@localhost SQL SECURITY DEFINER /
/!50001 VIEW vw_tickets_by_currentyear AS select ticket.TicketID AS TicketID,ticket.TicketPriorityID AS TicketPriorityID,ticket.StatusID AS StatusID,ticket.OwnerID AS OwnerID,ticket.CustomerID AS CustomerID,year(ticket.TicketDate) AS Year,ticket.CategoryID AS CategoryID,ticket.Subject AS Subject,ticket.TicketDate AS TicketDate,ticket.CustomerRating AS CustomerRating,ticket.CustomerComments AS CustomerComments,ticket.TicketLastUpdate AS TicketLastUpdate,ticket.TicketLastReplier AS TicketLastReplier,ticket.TicketTrack AS TicketTrack from ticket /;
/!50001 SET character_set_client = @saved_cs_client /;
/!50001 SET character_set_results = @saved_cs_results /;
/!50001 SET collation_connection = @saved_col_connection /;
/!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE /;
/!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS /;
/!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS /;
/!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT /;
/!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /;
/!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION /;
/!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;[/code]
Pois dá erro no relatório de categoria por mês, tempo de resposta e o gráfico (1º A DIREITA)
![]()
Erro:
Erro ao acessar o banco de dados
FUNCTION sgtkt.strftime does not exist
select count(*), strftime(’%Y/%m’,TicketDate) from ticket group by strftime(’%Y/%m’,TicketDate) order by strftime(’%Y/%m’,TicketDate) asc
Erro ao acessar o banco de dados
FUNCTION sgtkt.strftime does not exist
select count(*), case when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) <= 0 then ' 0 - 24 hrs' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) between 1 and 2 then '24 - 48 hrs' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) between 3 and 7 then '3 - 7 days ' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) between 8 and 15 then '8 - 15 days' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) > 15 then '> 15 days' end from ticket LEFT OUTER JOIN customer ON ticket.CustomerID = customer.CustomerID LEFT OUTER JOIN staff ON ticket.OwnerID = staff.StaffID INNER JOIN ticketstatus ON ticket.StatusID = ticketstatus.StatusID INNER JOIN ticketpriority ON ticket.TicketPriorityID = ticketpriority.TicketPriorityID INNER JOIN categories ON ticket.CategoryID = categories.CategoryID where ticket.StatusID = 'CLOSED' OR ticket.StatusID = 'SOLVED' group by case when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) <= 0 then ' 0 - 24 hrs' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) between 1 and 2 then '24 - 48 hrs' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) between 3 and 7 then '3 - 7 days ' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) between 8 and 15 then '8 - 15 days' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) > 15 then '> 15 days' end order by case when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) <= 0 then ' 0 - 24 hrs' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) between 1 and 2 then '24 - 48 hrs' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) between 3 and 7 then '3 - 7 days ' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) between 8 and 15 then '8 - 15 days' when coalesce(strftime('%d',TicketLastUpdate) - strftime('%d',TicketDate),0) > 15 then '> 15 days' end asc
Aguardo retorno e obrigada.