upper [message #374355] |
Thu, 07 June 2001 12:34 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
nandakumar
Messages: 5 Registered: October 2000
|
Junior Member |
|
|
hi
is there any way to enforce conversion of data to upper case at the DDL definition of table?
something like ...
create table xyz ( three_letter_code varchar2(1) 'upper(three_letter_code)');
This could help
a) ensure data gets stored in uppercase
b) get rid of the upper() function from the applications.
Thanks
|
|
|
Re: upper [message #374359 is a reply to message #374355] |
Thu, 07 June 2001 14:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
Jon
Messages: 483 Registered: May 2001
|
Senior Member |
|
|
You could add a check constraint to ensure all upper data:
SQL> create table mytest
2 (field1 varchar2(3) check (substr(field1,1,1) between 'A' and 'Z'
3 and substr(field1,2,1) between 'A' and 'Z'
4 and substr(field1,3,1) between 'A' and 'Z'));
Table created.
|
|
|