DELETE FROM agenda_tarefa WHERE idPrimario ='39994' - 42; DELETE FROM agenda_tarefa WHERE idPrimario ='-1729019864888' - 42; DELETE FROM agenda_tarefa WHERE idPrimario ='39995' - 42; DELETE FROM agenda_tarefa WHERE idPrimario ='39996' - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('39994','3','','42','2024-10-15','2024-10-15','','','','','42','31128401','-1729019942408','','') - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('39994','3','','42','2024-10-15','2024-10-15','','','','','42','30143001','-1729019998990','','') - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('39996','4','','42','2024-10-15','2024-10-15','','','','','42','31096801','-1729020140616','','') - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019864888','416','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019864888','417','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019864888','418','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019864888','419','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','305','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','207','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','111','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019942408','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','101','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','302','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','303','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','305','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','207','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729019998990','117','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','423','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','424','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','425','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','426','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','427','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','404','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','428','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','429','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','430','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','431','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','432','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','433','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','434','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','435','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','436','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729020140616','437','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('39995','','','') - 42; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('39994','','','') - 42; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('39996','','','') - 42; UPDATE agenda_resposta_formulario SET tarefa = 44258 WHERE tarefa = -1729019942408 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44258 WHERE tarefa = -1729019942408 - 42; UPDATE agenda_resposta_formulario SET tarefa = 44259 WHERE tarefa = -1729019998990 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44259 WHERE tarefa = -1729019998990 - 42; UPDATE agenda_resposta_formulario SET tarefa = 44260 WHERE tarefa = -1729020140616 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44260 WHERE tarefa = -1729020140616 - 42; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; insert into agenda_tarefa (idPrimario, assunto, vendedor, dataCriacao, dataInsercao, data, horario_inicial, horario_final, usuario, supervisor, idOriginal, observacao, clientes, resumo, status) select date_format(now(),'%Y%m%d%H%i%s') * -1, 999, b.vendedor, curdate(), now(), a.prazo, '08:00:00', '08:00:00', b.supervisor, b.supervisor, date_format(now(),'%Y%m%d%H%i%s') * -1, a.acao, '', '', 'Pendente' FROM agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b where a.tarefaAgendada is null and a.tarefa = b.id ; - 42; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 42; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 42; statusNaoFinalizado - 42; statusNaoFinalizado - 42; statusNaoFinalizado - 42;