| Author |
How to write triggers
|
Chhaya Dhanani
Ranch Hand
Joined: Apr 11, 2001
Posts: 70
|
|
hi all, i am facing problems about writing a trigger. in fact i dont know how to write one as i am a java programmer. not much knowledge about oracle except for querying The issue is as foolows thru a text box in a form, a record is inserted. The value in the text box is entered as 123-123456789 I want a trigger at this insert which will do the following: if insert is into TABLE1, it should read the value and remove the hypen from the value and only then insert into TABLE1 that is the value should go as 123123456789 how do i go about doing this? Thanx in advance Chhaya
|
 |
Remar Uy
Ranch Hand
Joined: Mar 18, 2002
Posts: 35
|
|
hi, try this: create trigger the_trigger_name before insert on the_table_name for each row begin :new.column := replace(:new.column,'-',''); end; / hth.
|
 |
 |
|
|
subject: How to write triggers
|
|
|