INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1720273207106','3','','42','2024-07-06','2024-07-06','','','','','42','31096801','-1720273211092','','') - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1723212143754','3','','42','2024-08-09','2024-08-09','','','','','42','31096801','-1723212164659','','') - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1723212329854','2','','42','2024-08-09','2024-08-09','','','','','42','31096801','-1723212338769','','') - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1723212569179','4','','42','2024-08-09','2024-08-09','','','','','42','31096801','-1723212590398','','') - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','101','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','303','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','107','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','109','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','210','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212164659','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212338769','416','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212338769','417','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212338769','418','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212338769','419','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','423','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','424','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','425','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','426','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','427','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','404','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','428','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','429','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','430','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','431','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','432','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','433','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','434','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','435','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','436','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1723212590398','437','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('-1723212065010','','','') - 42; UPDATE agenda_resposta_formulario SET tarefa = 34529 WHERE tarefa = -1720273211092 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 34529 WHERE tarefa = -1720273211092 - 42; UPDATE agenda_resposta_formulario SET tarefa = 34530 WHERE tarefa = -1723212164659 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 34530 WHERE tarefa = -1723212164659 - 42; UPDATE agenda_resposta_formulario SET tarefa = 34531 WHERE tarefa = -1723212338769 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 34531 WHERE tarefa = -1723212338769 - 42; UPDATE agenda_resposta_formulario SET tarefa = 34532 WHERE tarefa = -1723212590398 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 34532 WHERE tarefa = -1723212590398 - 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; statusNaoFinalizado - 42;