Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check constraint question
Message
From
03/08/1999 12:33:52
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Database design
Title:
Check constraint question
Miscellaneous
Thread ID:
00249280
Message ID:
00249280
Views:
55
Hi,

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?

On a char field, I know I can do ..... "like [a-z0-9][a-z0-9][a-z0-9][a-z0-9]" ... etc for however many characters wide the field is, but this seems awkward and difficult on a varchar or long char field. Any way just to check to make sure entire value is alphanumeric?

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.

thanks,
Ken
Ken B. Matson
GCom2 Solutions
Next
Reply
Map
View

Click here to load this message in the networking platform