update a column using existing column in the same table [message #301885] |
Fri, 22 February 2008 02:58 |
dr.s.raghunathan
Messages: 540 Registered: February 2008
|
Senior Member |
|
|
dear sir/madam,
I have one table name as Check_in
where the following columns are available
id number
Room_no varchar2(3) foreign key refers room_mst(room_no)
Chk_in_dt varchar2(20)
chk_ou_dt varchar2(20)
Room_rent number(10,2)
Luxary_tax_rate number(10,2)
total_value number(10,2)
Table Nmae Room_mst
id number
room_no varchar2(3) indexed
rent_per_day number(10,2)
I was able to fetch rent_per_day from the room_mst and update the column in check_in(room_rent) using the trigger
(after insert or update or delete on each statement)
I was unable to create trigger to populate the total_value
with room_rent * (1 + luxary_tax_rate) for each row of insert or update or delte
Why triggers are not getting fired when handling the columns available in the same table?
What sort of the mistake i am doing?
thanks in advance and yours faithfully,
dr.s.raghunathan
|
|
|
|
|