Leading provider of Account Software
Questions? We got answers!
Support Center > Knowledge base> Article: Change agent A to Agent B for all transactions

Change agent A to Agent B for all transactions

Article ID: 52668 Email Print
Question
Change There is a agent A already resign, all his transactions want to transfer to agent B. I need a script which can update all transaction from Agent A to Agent B. Users has created Agent B and key-in so many transactions. agent A to Agent B for all transactions

Answer

update ARDN set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update CASHSALES set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update DEBTOR set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update DELIVERYORDER set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update INVOICE set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update QUOTATION set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update SALESPERSONCOMMBYCOLLPERIOD set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update SALESPERSONCOMMISSION set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update SALESPERSONCOMMISSIONDETAIL set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update SALESDN set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update SALESINVOICE set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update SALESORDER set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update ARRECEIPT set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update SALESPERSON set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update SALESCN set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update ARCN set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---

update SALESDEPOSIT set SALESPERSONCODE = 'B'

where SALESPERSONCODE = 'A'

---


related articles

Article Details
Views: 1110 Created on: Aug 07, 2014
Date updated: Aug 07, 2014
Posted in: Delphi

Poor Outstanding