why why why ?????? SQL is set based why must developers constantly seek to overcomplicate things - you only need a lookup table.
I've encountered a software release ( on a major big system ) where the delopers sought to implement functions as constants to replace 12 simple values required in a lookup table. The result as pointed out earlier was to turn all the queries into row based ( cursor ) ops and actually made the whole project unworkable.
It probably looks fine on a laptop with a tiny data set but scale it up into production data sets and you're in for big trouble.
sorry.
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/