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; 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; 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; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('30025','3','','100099','2024-06-18','2024-06-18','','','','','42','30439901','-1718711986543','','') - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','107','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718711986543','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; UPDATE agenda_resposta_formulario SET tarefa = 30290 WHERE tarefa = -1718711986543 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30290 WHERE tarefa = -1718711986543 - 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; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('30025','3','','100099','2024-06-18','2024-06-18','','','','','42','30002901','-1718712042647','','') - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','101','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','303','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718712042647','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; UPDATE agenda_resposta_formulario SET tarefa = 30291 WHERE tarefa = -1718712042647 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30291 WHERE tarefa = -1718712042647 - 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;