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'
---