sql_2005_fan - Tuesday, January 24, 2017 4:42 AM
Your statements are all quite different, so 3 does seem the logical choice here. If you are meant to only get one result out of the 3, then using END ELSE IF BEGIN will cut them down.
Are you saying that your query runs slowly then? Perhaps the problem is not with doing 3 EXiSTS, and that being slow, but that your VIEW is, and that needs a review.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk