Inserts in caps in the Bank

Dúvidas, dicas e truques de PL/SQL. Aqui também vão assuntos relacionados a pacotes, triggers, funções, Java-Stored Procedures, etc
  

Poston Mon, 26 Jul 2004 10:53 am

Staff is as follows: I am developing a registration system in JDeveloper and registration processes I want the data to be entered as uppercase, regardless of user enter them in lowercase.

does anyone know how to do this?

Thanks
edu_oracle
Location: Salvador

Atenciosamente,

Eduardo Santana

"Viva o dia de hoje como se fosse amanhã, por isso, não perca as oportunidades...."

Poston Mon, 26 Jul 2004 11:05 am

What you can do, if you do not want to mess us programs, is to create a TRIGGER BEFORE INSERT ...

In it, you get the desired field and does so:
Code: Select all
create or replace trigger SUA_TRIGGER
BEFORE INSERT ON SUA_TABELA REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
   --antes de inserir, deixa maiúsculo
  :NEW.SEU_CAMPO:=UPPER(:NEW.SEU_CAMPO);
END;
dr_gori
Location: Portland, OR USA

Thomas F. G

Você já respondeu a dúvida de alguém hoje?
http://glufke.net/oracle/search.php?search_id=unanswered

Poston Mon, 26 Jul 2004 11:21 am

Thanks man, I'm going to apply.
edu_oracle
Location: Salvador

Atenciosamente,

Eduardo Santana

"Viva o dia de hoje como se fosse amanhã, por isso, não perca as oportunidades...."

Poston Thu, 05 Aug 2004 9:27 am

Man is as follows, the trigger that you referred me to is functional, except that my situation is as follows: previously I was inserting a word in a form and comitando this word in another form, thus the trigger functioned beauty.

But now I need to insert the word and comitá it in the same form, then when I go to the main form the Word will be changed.


Do you have any suggestion?
edu_oracle
Location: Salvador

Atenciosamente,

Eduardo Santana

"Viva o dia de hoje como se fosse amanhã, por isso, não perca as oportunidades...."

Poston Thu, 05 Aug 2004 9:53 pm

I think what's missing there is a refresh or something ... I don't know if you'll do that without moving your program codes ...:-(
dr_gori
Location: Portland, OR USA

Thomas F. G

Você já respondeu a dúvida de alguém hoje?
http://glufke.net/oracle/search.php?search_id=unanswered

Poston Fri, 06 Aug 2004 7:40 am

Pow guy, solved the problem.

The case was: When I fired Trigger, there were some data in one of the tables that I had not seen. There was error.

The trigger as is, it's running perfectly.

Once again thank you.
edu_oracle
Location: Salvador

Atenciosamente,

Eduardo Santana

"Viva o dia de hoje como se fosse amanhã, por isso, não perca as oportunidades...."



Return to PL/SQL

Who is online

Users browsing this forum: Google [Bot] and 6 guests