Home Forums SQL Server 7,2000 T-SQL Doing Short Circuiting in WHERE clause RE: Doing Short Circuiting in WHERE clause

  • Actually, I did think of implementing 'jpipes' method before I posted. But when you give users 4 to 8 different ways to tailer their search, like Scott says, the permutations sure add up quickly.

    I think that some of my search senerios will likely bias one over another method.....albeit not necessarily from a performance aspect. I've found in the past when you granulize code "too" much, it gets harder to maintain and follow code.

    I think for the really complicated search senarious I will use Dynamic SQL but otherwise implement jpipes suggestion.

    I have a followup question. I have a couple of functions that I've created. The functions return a table (ie. results from a search senario). I'm now using them my JOINS. Is it "better" to use them there or in a WHERE clause? Earlier, I was using them with an WHERE EXISTS. (I don't much data to do a test on which is why I'm posing the question.)

    --Lenard