I am trying to use UPDATE twice within the same query to revise my TABLE data. Can you explain how I do this? I am getting a sytax error on the following code:
UPDATE HRBI SET HRBI.PayGroupLocationPayGroupCountryCode = IIF(HRBI.PayGroupLocationPayGroupCountryCode = 'DEU' AND HRBI.ManagementLevel = 'VP', 'DEU - Exec',
IIF(HRBI.PayGroupLocationPayGroupCountryCode = 'DEU' AND HRBI.ManagementLevel = 'SVP', 'DEU - Exec',
IIF(HRBI.PayGroupLocationPayGroupCountryCode = 'DEU' AND HRBI.ManagementLevel = 'FEL', 'DEU - Exec',
IIF(HRBI.PayGroupLocationPayGroupCountryCode = 'DEU' AND HRBI.ManagementLevel = 'DIR', 'DEU - Exec',
IIF(HRBI.PayGroupLocationPayGroupCountryCode = 'DEU' AND HRBI.ManagementLevel = 'SFL', 'DEU - Exec',
IIF(HRBI.PayGroupLocationPayGroupCountryCode = 'DEU' AND HRBI.ManagementLevel = 'STR', 'DEU - Exec',
IIF(HRBI.PayGroupLocationPayGroupCountryCode = 'DEU' AND HRBI.ManagementLevel = 'EVP', 'DEU - Exec',
IIF(HRBI.WorkerID = '45' OR HRBI.WorkerID = '46' OR HRBI.WorkerID = '47' OR HRBI.WorkerID = '48' OR HRBI.WorkerID = '49' OR HRBI.WorkerID = '50' OR HRBI.WorkerID = '51', 'DEU - Exec', HRBI.PayGroupLocationPayGroupCountryCode))))))))
UPDATE SET HRBI.PayGroupCountryDesc = IIF(HRBI.PayGroupLocationPayGroupCountryCode = 'DEU - Exec', "Germany - Exec',HRBI.PayGroupCountryDesc);
I tried to add an additional UPDATE to the end of the other UPDATE. Also, is there a way to add a COMMENT within Access SQL? Thanks!