Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select co.id
- from tab_conciliacao co
- join tab_planejamento_cenario pc on co.id_planejamento = pc.id
- join tab_cenario ce on pc.id_cenario = ce.id
- join tab_cadastro_planejamento cp on pc.id_cadastro_planejamento = cp.id
- where ce.des_cenario = 'RF09 2017/2017'
- and cp.des_cadastro not in ('33939 - CD Fortaleza', '33938 - CD Aracaju')
- and cp.id_tipo_cadastro_planejamento = 4;
- -- Deleta todas as conciliacoes
- 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);
- 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);
- 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);
- 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);
- 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