-
Fellow Oracle enhousiasts,
is there a way to define fields in a table so they only accept (or translate to ) uppercase?
Thx,
Rik
-
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.
Jeff Hunter
-
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.
Thanks
-
I've made a trigger like this:
TRIGGER txperson_ucase
before insert or update on txperson
begin
insert into txperson
values (PERSONID,
LASTNAME,
FIRSTNAME,
upper(USERID),
upper(PASSWORD),
ADDRESSID,
STARTdate,
ENDdate,
AVAILABILITY,
REGISTRATIONPHASE,
CREATION,
CREATORID,
MODIFICATIONID,
MODIFICATORID);
commit;
end;
where fields userid and passwod are to be put in uppercase.
Is this the right way (how does oracle know which values to take?),
Thx,
Rik
-
Arbe,
The trigger is very simple.
create trigger txperson_ucase before insert or update on txperson for each row
begin
:new.USERID := upper(:new.USERID);
:new.PASSWORD := upper(:new.PASSWORD;
end;
/
hptse
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|