Question: I have a SQL Update statement that worked in SalesLogix v6.1 but is not working in v7.5. I know it needs to be updated, but I can't get it to work:
SET UF_ACCOUNTMANAGERID = PC.ACCOUNTMANAGERID, UF_SECCODEID = PC.OWNERID
FROM UF_POSTALCODE PC, ADDRESS A, ACCOUNT AC, USERINFO UI
WHERE A.POSTALCODE = PC.POSTALCODE
AND AC.ACCOUNTID = A.ENTITYID
AND AC.ACCOUNTMANAGERID = UI.USERID
AND LEFT(A.ENTITYID,1) = 'A'
AND (A.ISPRIMARY = 'T' OR A.ISPRIMARY IS NULL)
AND PC.POSTALCODE IS NOT NULL
AND (PC.ROUTING IS NULL OR PC.ROUTING = '')
AND UI.DEPARTMENT = 'SALES'
AND (UF_ACCOUNTMANAGERID<>PC.ACCOUNTMANAGERID OR
UF_ACCOUNTMANAGERID IS NULL OR UF_SECCODEID <> PC.OWNERID OR UF_SECCODEID IS NULL) Read more