• The easiest way is to do it like this

    WHERE Oink.[System] like @System + '%'

    ANDOink.Stratigrafie like @Stratigrafie + '%'

    ANDOink.Ulozeni like @Ulozeni + '%'

    AND Oink.DrEvid like @DrEvid + '%'

    Or you can add it to the variables before the query if it's easier for you.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2