forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
2.1 KiB
33 lines
2.1 KiB
2 years ago
|
SELECT * FROM pbx_campanha_referencia_recicla;
|
||
|
|
||
|
select * from pbx_cliente_audio where client_id in(select client_id from pbx_cliente where client_status in('9', '10', '11', '20', '23', '24'));
|
||
|
select * from pbx_cliente_anotacoes where client_id in(select client_id from pbx_cliente where client_status in('9', '10', '11', '20', '23', '24'));
|
||
|
select * from pbx_cliente_contato where client_id in(select client_id from pbx_cliente where client_status in('9', '10', '11', '20', '23', '24'));
|
||
|
select * from pbx_cliente where client_id in(select client_id from pbx_cliente where client_status in('9', '10', '11', '20', '23', '24'));
|
||
|
|
||
|
|
||
|
delete from pbx_cliente_audio where client_id in(select client_id from pbx_cliente where client_status in('9', '10', '11', '20', '23', '24'));
|
||
|
delete from pbx_cliente_anotacoes where client_id in(select client_id from pbx_cliente where client_status in('9', '10', '11', '20', '23', '24'));
|
||
|
delete from pbx_cliente_contato where client_id in(select client_id from pbx_cliente where client_status in('9', '10', '11', '20', '23', '24'));
|
||
|
delete from pbx_cliente where client_id in(select client_id from pbx_cliente where client_status in('9', '10', '11', '20', '23', '24'));
|
||
|
|
||
|
update pbx_cliente set client_status = 0 where client_status in('1','2', '3', '4', '6', '8','12', '19', '25');
|
||
|
|
||
|
select ctst_ID, ctst_nome, count(*)
|
||
|
from pbx_cliente a, pbx_campanha_contato_status b
|
||
|
where b.ctst_id = a.client_status::int
|
||
|
group by ctst_ID, ctst_nome order by 1
|
||
|
|
||
|
|
||
|
select * from pbx_campanha_operacao where cmp_id = 230;
|
||
|
|
||
|
-- desativa todas as listas do pre-venda, deve-se observar o id_dac e atualizar para o correspondente.
|
||
|
update pbx_campanha_lista set list_status = 2 where cmp_id IN(select cmp_id from pbx_campanha where ID_DAC = 134);
|
||
|
update pbx_campanha_contato set cont_status = -1 where cmp_id IN(select cmp_id from pbx_campanha where ID_DAC = 134);
|
||
|
update pbx_campanha_contato_fone set conf_status = '-1' where cmp_id IN(select cmp_id from pbx_campanha where ID_DAC = 134);
|
||
|
update pbx_campanha set cmp_status = '0' where cmp_id in( select cmp_id from pbx_campanha where ID_DAC = 134);
|
||
|
|
||
|
|
||
|
/*
|
||
|
|
||
|
*/
|