I am trying to use an UPDATE query in SQL (Access). What I would like to do is update the results of the query without affecting the underlying table. So, keep the original table intact, but update my query results. When I attempt the following code I update my query, but also the table as well. Any ideas?
UPDATE [HRBI Query]
SET [HRBI Query].PaySegmentMultiplier = IIF([HRBI Query].[PayGroupCountryDesc] = 'Country' AND [HRBI Query].PaySegment = 'Above top segment', 0,
IIF([HRBI Query].[PayGroupCountryDesc] = 'Country' AND [HRBI Query].PaySegment = 'Below segment 1', 1.35,
IIF([HRBI Query].[PayGroupCountryDesc] = 'Country' AND [HRBI Query].PaySegment = 'S1', 1.25,
IIF([HRBI Query].[PayGroupCountryDesc] = 'Country' AND [HRBI Query].PaySegment = 'S2', 1.15,
IIF([HRBI Query].[PayGroupCountryDesc] = 'Country' AND [HRBI Query].PaySegment = 'S3', .90,
IIF([HRBI Query].[PayGroupCountryDesc] = 'Country' AND [HRBI Query].PaySegment = 'S4', .60,
IIF([HRBI Query].[PayGroupCountryDesc] = 'Country' AND [HRBI Query].PaySegment = 'S5', .40,
PaySegmentMultiplier.PaySegmentMultiplier
)
)
)
)
)
)
);