Update query is running too slow

bugsy

Registered User.
Local time
Today, 03:36
Joined
Oct 1, 2007
Messages
99
What would be a better way to do below query --

Code:
UPDATE (tblAFFIRMATION_REC_TOOL LEFT JOIN tbl_TZero_Spns ON tblAFFIRMATION_REC_TOOL.CptySPN = tbl_TZero_Spns.SPN) INNER JOIN Entity ON tblAFFIRMATION_REC_TOOL.ReferenceEntity = Entity.ReferenceEntity 

SET tblAFFIRMATION_REC_TOOL.[Scope Reason] = IIf(IsNull(tbl_TZero_Spns!SPN) Or (Entity!Test='EM'),tblAFFIRMATION_REC_TOOL![Scope Reason],'TZero Trade')


WHERE ((([tblAFFIRMATION_REC_TOOL]![Scope Reason])="Affirmation Eligible"));

the way it right now, it's running for about half hour..
Could that be IIF statement that slows it down ?
 
How many record are in the tables? Can you remove any indexes? That will speed things up a bit.
 

Users who are viewing this thread

Back
Top Bottom