Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. select co.id
  2. from tab_conciliacao co
  3. join tab_planejamento_cenario pc on co.id_planejamento = pc.id
  4. join tab_cenario ce on pc.id_cenario = ce.id
  5. join tab_cadastro_planejamento cp on pc.id_cadastro_planejamento = cp.id
  6. where ce.des_cenario = 'RF09 2017/2017'
  7. and cp.des_cadastro not in ('33939 - CD Fortaleza', '33938 - CD Aracaju')
  8. and cp.id_tipo_cadastro_planejamento = 4;
  9.  
  10. -- Deleta todas as conciliacoes
  11. delete from tab_conciliado_ceco_cabinets where id_conciliacao in (1783,1789,1810,1801,1800,1803,1802,1812,1788,1795,1785,1793,1790,1796,1811,1799,1792,1798,1791,1797,1786,1794,1782,1787,1781,1784);
  12. delete from tab_ksb1_conciliacao where id_conciliacao in (1783,1789,1810,1801,1800,1803,1802,1812,1788,1795,1785,1793,1790,1796,1811,1799,1792,1798,1791,1797,1786,1794,1782,1787,1781,1784);
  13. delete from tab_item_planejamento_cabinets_conciliacao where id_conciliacao in (1783,1789,1810,1801,1800,1803,1802,1812,1788,1795,1785,1793,1790,1796,1811,1799,1792,1798,1791,1797,1786,1794,1782,1787,1781,1784);
  14. delete from tab_conciliacao where id in (1783,1789,1810,1801,1800,1803,1802,1812,1788,1795,1785,1793,1790,1796,1811,1799,1792,1798,1791,1797,1786,1794,1782,1787,1781,1784);
  15.  
  16. update tab_log_job set id_status_log = 1 where id in (1140,1133,1145,1137,1152,1159,1164);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement