In tables called IV00102 and RM00102, for a certain set of customers with Address IDs, I changed the Site ID (i.e. location) to 2. Now, I need to--in GP's Sales Order Processing module's history--change the Site ID for the same customers and Address IDs to 2. That set of customers is in a table called "CUSTOMERS4SITE2".
The problem that I'm having with the T-SQL query update statement is that--for the SOP30200 table--I don't know if the Address IDs in CUSTOMERS4SITE2 are a "ship to ID" (SOP30200.PRSTADCD) or "bill to" ID (SOP30200.PRBTADCD).
Below is the update statement that I have. Will this work?
UPDATE SOP30200 SET SOP30200.LOCNCODE = '2'
INNER JOIN CUSTOMERS4SITE2 ON (SOP30200.CUSTNMBR = CUSTOMERS4SITE2.CustomerNumber and SOP30200.PRSTADCD = CUSTOMERS4SITE2.AddressCode)
(SOP30200.CUSTNMBR = CUSTOMERS4SITE2.CustomerNumber and SOP30200.PRBTADCD = CUSTOMERS4SITE2.AddressCode)
where (CUSTOMERS4SITE2.CustomerNumber = SOP30200.CUSTNMBR and SOP30200.PRSTADCD = CUSTOMERS4SITE2.AddressCode)
(CUSTOMERS4SITE2.CustomerNumber = SOP30200.CUSTNMBR and SOP30200.PRBTADCD = CUSTOMERS4SITE2.AddressCode)