DELETE FROM agenda_tarefa WHERE idPrimario ='-1732625242458' - 47; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1732625062560','1','','3034','2024-11-26','2024-11-26','09:00:00','18:00:00','Pendente','47','47','','-1732625062560','','') - 47; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1732625062560','1','','3034','2024-11-26','2024-11-26','','','','','47','13630401','-1732625231923','','') - 47; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1732625062560','1','','3034','2024-11-26','2024-11-26','','','','','47','20028001','-1732629424820','','') - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','102','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','103','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','105','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','204','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','205','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','304','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','108','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','307','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','420','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','421','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','422','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','113','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','209','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','212','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','116','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','214','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732625231923','215','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','102','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','103','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','105','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','107','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','204','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','205','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','304','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','108','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','307','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','420','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','421','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','422','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','109','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','113','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','209','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','210','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','212','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','116','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','214','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1732629424820','215','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 47; UPDATE agenda_tarefa SET idPrimario = 45315 WHERE idPrimario = -1732625062560 - 47; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 45315 WHERE tarefa = -1732625062560 - 47; UPDATE agenda_resposta_formulario SET tarefa = 45316 WHERE tarefa = -1732625231923 - 47; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 45316 WHERE tarefa = -1732625231923 - 47; UPDATE agenda_resposta_formulario SET tarefa = 45317 WHERE tarefa = -1732629424820 - 47; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 45317 WHERE tarefa = -1732629424820 - 47; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 47; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 47; 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 ; - 47; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 47; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 47; statusNaoFinalizado - 47; statusNaoFinalizado - 47; statusNaoFinalizado - 47;