Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Qestion about check constraints. Need help.
On Mon, 19 May 1997 11:36:30 -0600, tomas_at_senna.std.lt wrote:
>Is it possible to create check constraint that check if data contain only
>letters (not numbers or other symbols)
>
>-------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
If you know all the possible characters in the data column, then the following will probably work:
check (columnname = translate(columnname, 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()', 'abcdefghijklmnopqrstuvwxyz'))
Of course, you will have to substitute uppercase for the above if the data only contains uppercase. The idea here being that the original column value must equal the translated valued with all characters you aren't interested in having been stripped out.
Dave Macpherson Received on Tue May 20 1997 - 00:00:00 CDT
![]() |
![]() |