update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 44; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 44; 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 ; - 44; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 44; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 44; DELETE FROM agenda_tarefa WHERE idPrimario ='-1746477129449' - 44; DELETE FROM agenda_tarefa WHERE idPrimario ='-1746477139543' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','302','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746477129449','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('52462','','','') - 44; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 44; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 44; 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 ; - 44; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 44; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 44;