Evra70

aaaa

Dec 9th, 2021
807
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. BEGIN;
  2. UPDATE sl_invoice_tax A
  3. SET tax_no = '000.000-00.00000000 '
  4. FROM sl_invoice_tax B
  5. WHERE A.tenant_id = 10  
  6. AND B.tenant_id = A.tenant_id
  7. AND B.tax_no = '010.007-21.40684275'
  8. AND B.invoice_id =
  9.     ( SELECT C.invoice_id
  10.         FROM sl_invoice C
  11.         WHERE B.tenant_id = C.tenant_id
  12.         AND C.doc_no = 'SI/000325/KPS/202111');
  13.  
  14. SELECT * FROM sl_invoice_tax WHERE invoice_id = (
  15.     SELECT invoice_id FROM sl_invoice WHERE tenant_id = 10
  16.           AND doc_no = 'SI/000325/KPS/202111')
  17.  
  18. --rollback
RAW Paste Data