Subject Re: Custom search string
Author Ali Gökçen
Grant,
>
> If I do it this way I then need to set up an if statement to cover
all
> possibilitys for all 10 input variables. That would be a fairly
large if
> statement.

10 posibility and 10*2 prameters is not more expensive than dynamic
sql creation, preparing in my opinion.
i wrote as false because i didn't know your true/false interpretion.
(:X = 0 or text1 = :T1) runs very fast in both posibilites.

>
> >if X = true then ABC.SQL.Add('and Text1= :T1);
>
> In this case the X is not a variable to search on its just a flag
to say
> "please add T1 to the search string"

Yup, i know, i wrote the sql in draft mode.
(:X=0 or text1=:T1) means of do search for :T1 only when :X=true.

i wrote this logic because you want use this query in stored
procedure if i understand correctly.

>
> If X = false then T1 does not become even part of the SQL search
string.
>

It is no so much saving i thing, i were u, i prefer clean code
instead of dynamic comlexity.

Regards,

Ali