Ken,
>How can I set a check constraint to make sure the value is alphanumeric? that is - contains nothin but 0-9 and a-z anywhere in it?
Will something like this work?
ALTER TABLE tablename
ADD
CONSTAINT alphanum_only CHECK (vcolumn LIKE REPLICATE('[0-9A-Z]', DATALENGTH(v))
This seems to work best for varchar columns.
>Also - in a three tier (virtual 3-T at least), is this kind of validation best handled by back end or middle tier? It seems to fall somehwere in-between RI and business rule.
You could start a war with a question like this (bg). There are those people who believe that all rules should be handled by the middle tier. Then there are those people who believe that the rule should be handled at the lowest level (with the data layer being the lowest and the presentation layer the highest) that can implement it. There's probably not a right answer.
-Mike