MySQL Forums
Forum List  »  Newbie

Logical Doubt
Posted by: david medeiros cardoso David
Date: December 29, 2016 10:37AM

Hello there guys, thanks in advance for any kind of assistance!

Well, here I go on my first topic, I have the following query:

SELECT DISTINCT t.id, t.origin, t.first_response_time, t.solved_time, t.created_at, t.replies, tt.id, tt.ticket_id, tt.tag
FROM tickets AS t
JOIN ticket_tags AS tt ON t.id = tt.ticket_id
WHERE t.id = 90784
#AND tt.tag NOT LIKE '%auto%'

that's the result:

id origin first_response_time solved_time created_at replies id1 ticket_id tag
90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958553 90784 auto_response_ebanx
90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958554 90784 auto_response_entrega_br
90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958555 90784 boleto
90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958556 90784 brasil_simiexpress
90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958557 90784 com_resposta
90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958558 90784 dúvida
90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958559 90784 quem_entrega


When I remove # from the last line, the query result will be:

90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958555 90784 boleto
90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958556 90784 brasil_simiexpress
90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958557 90784 com_resposta
90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958558 90784 dúvida
90784 Mail 2016-12-07 18:54:48 -0200 2016-12-07 18:54:48 -0200 09/11/2016 10:20:28 1 958559 90784 quem_entrega

What should I do, to avoid this entire registry to be displayed? Because once I set the NOT LIKE %auto%, that's what I was expecting...


Thanks!

Options: ReplyQuote


Subject
Written By
Posted
Logical Doubt
December 29, 2016 10:37AM
December 29, 2016 11:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.