• To be honest I wouldn't use any, instead I'd use a range table such as below, avoids hardwiring values

    create table Ranges(GrossPayMin decimal(10,3) not null,

    GrossPayMax decimal(10,3) not null,

    Boo int not null,

    primary key(GrossPayMin,GrossPayMax))

    insert into Ranges(GrossPayMin,GrossPayMax,Boo) values(0, 35.17,0)

    insert into Ranges(GrossPayMin,GrossPayMax,Boo) values(35.17,151,40)

    insert into Ranges(GrossPayMin,GrossPayMax,Boo) values(151,201,50)

    ...

    insert into Ranges(GrossPayMin,GrossPayMax,Boo) values(351,99999,90)

    select @boo=Boo

    from Ranges

    where @gross_pay>=GrossPayMin

    and @gross_pay<GrossPayMax

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537