Fellow Oracle enhousiasts,
is there a way to define fields in a table so they only accept (or translate to ) uppercase?
If that is a hard and fast rule, I would put a before-insert trigger on the table and convert the values to upper-case before you insert them into the table.
If you are Inserting these values from the Front End, Very easy cahnge the property to Upper, No Trigger , no headache.
If not from Front end, There are 2 ways.
1 Before Insert Trigger can do that.
2- Have a Check Constranit for Upper.
I've made a trigger like this:
before insert or update on txperson
insert into txperson
where fields userid and passwod are to be put in uppercase.
Is this the right way (how does oracle know which values to take?),
The trigger is very simple.
create trigger txperson_ucase before insert or update on txperson for each row
:new.USERID := upper(:new.USERID);
:new.PASSWORD := upper(:new.PASSWORD;
Click Here to Expand Forum to Full Width