This article outlines how to remove sales tax overrides from multiple customer records through a bulk operation in the database.
Execute the following queries on the database:
- Backup the records to be updated by executing the following SQL query:
select c.cust_code, c.name, x.name list_name, c.billcode, a.addr_code, a.custchar8, a.custchar9
from cust c inner join address a on c.BILLCODE = a.addr_code and c.cust_code = a.CUST_CODE
inner join zd2266225_list x on c.cust_code = x.cust_code
- Execute the following update statement to remove the sales tax overrides and commit the changes:
update address set custchar8 = null, custchar9 = null from zd2266225_addr x
where address.addr_code = x.ADDR_CODE
and address.CUST_CODE= x.CUST_CODE and x.custchar8 = ADDRESS.custchar8 and x.custchar9 = address.custchar9
The updated customer records should have the sales tax overrides removed.
Please sign in to leave a comment.