Viewing 3 posts - 1 through 4 (of 4 total)
Hi Lowell,
i think the AND would short circuit any table scan right away, and will perform a bit better.
That indeed did the trick, I was sort of looking for,...
December 10, 2013 at 8:02 am
#1672331
Hi David,
Thanks for your reply.
Your solution won't work, I'm affraid, because @Criteria1 applies to Column1, and @Criteria2 applies to Column2. When one of the @Criteria parameters is empty, it should...
December 10, 2013 at 7:01 am
#1672301
Anybody?
I now have the following, which performs better, but doesn't seem optimal to me:
DECLARE @AllIDs table (ID int PRIMARY KEY)
IF @Criteria1<>'' AND @Criteria2=''
INSERT INTO @AllIDs (ID)
SELECT...
December 10, 2013 at 12:34 am
#1672216