• Actually hardcoding business rules is an extremely bad practice.

    So, none of the options is preferrable.

    (do I sound like you know who? 😉 )

    If you follow the proper DB modelling rules you put the values into a lookup table and then you get to the really preferrable approach:

    Select AColumn

    from ATable A

    where not exists (

    select * from LookupTable L

    where A.AnotherColumn=L.ExcludedValue)

    _____________
    Code for TallyGenerator