update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
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 ; - 40;
update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 40;
update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 40;
DELETE FROM agenda_tarefa WHERE idPrimario ='34537' - 40;
update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
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 ; - 40;
update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 40;
update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 40;
UPDATE agenda_tarefa SET assunto ='3', observacao = '', vendedor='0', dataCriacao = '2024-09-04', data = '2024-09-28', horario_inicial = '08:00:00', horario_final = '08:00:00', status = 'Finalizado', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '34528' - 40;
INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('34528','','','') - 40;
update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
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 ; - 40;
update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 40;
update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 40;
sqlCabecalho-> SELECT a.idPrimario,
f.descricao,
concat(b.supervisor,' - ',g.nome) supervisor,
concat(b.vendedor,' - ',h.nome) vendedor,
DATE_FORMAT(b.data, '%d/%m/%Y') as data,
b.horario_inicial,
b.horario_final,
b.supervisor,
b.vendedor
FROM agenda_tarefa a, agenda_tarefa b
left join agenda_assunto f on b.assunto = f.id
left join vendedor g on b.supervisor = g.id
left join vendedor h on b.vendedor = h.id,
agenda_resposta_formulario c
left join agenda_item d on c.item = d.id
left join agenda_grupo e on d.grupo = e.id
WHERE a.idPrimario = b.id
AND a.id = c.tarefa
AND a.idPrimario = '34528'
GROUP BY a.idPrimario - 40;
Binding output parameters deu certo: ( 0) - 40;
FORM VENDEDOR 20 - 40;
GRUPO->
Grupos:
- 40;
Respostas->Questões:
Grupo | Questões | Qtd | Percentual |
---|
- 40;
DELETE FROM agenda_tarefa WHERE idPrimario ='34528' - 40;
update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
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 ; - 40;
update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 40;
update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 40;