• You wouldn't need a c.u.r.s.o.r *cough*. It'll be dynamic SQL anyway (at least from my perspective...).

    The question is:

    How do you know, that the search conditions are combined using AND instead of OR?

    There's no indication why

    DELETE FROM tblProduct WHERE ProductID NOT IN (1,2) AND OR ProductName IN ('Keyboad','Mouse') wouldn't be correct either.... If "OR" comes into place, we'll need to talk about logical order and precedence. -> A AND (B OR C) or rather (A AND B) OR C or even (A OR C) AND B?

    The current requirement also seems like to figure the data type on each and every value in order to determine the format the data need to be presented (e.g. numeric or character, or date??). It would make the task slightly less complicated, if the selected values could always be presented as character values (leading to implicit conversion in some cases and maybe to incorrect data in others, especially if DATE/DATETIME data type are involved)...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]