• nugroho (1/22/2008)


    Hi all,

    Second Question:

    SELECT * FROM Table1 WHERE (@S=1 AND CONTAINS(column1,'key1')) OR (@S=2 AND CONTAINS(column2,'key1')) OR (@S=3 AND CONTAINS(column3,'key1'))

    Does SQL engine will search (CONTAINS) only in 1 column depending on the value of @s-2 ? Or it will search on on all columns, then coming back to see the boolean of the clauses ?

    that should work well since the comparison to @s-2 should be resolved without even considering any rows. so only the desired full text search should take run.