September 30, 2009 at 1:34 pm
Also tried taking NOT LIKE off the query and executed but still the same time.
is there any other way i can query to get the same result ?
September 30, 2009 at 2:18 pm
Ok. After trying to execute the query by part only this part of the query is taking too long
empcode between '99201' and '99205' or empcode between '99211' and '99215' or
empcode between '99241' and '99245' or empcode between '99354' and '99355' or
empcode between '99381' and '99406' or empcode between '90804' and '90815' or
if there is a way to tweak this part and get the sme result that would help.
September 30, 2009 at 10:02 pm
Sure... turn those ranges of EmpCodes into a single derived table with a single column of all the EmpCodes and use WHERE EXISTS or an INNER JOIN. It will also take care of your "IN" for EmpCodes as well.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply