Update Another Table [message #646113] |
Sat, 19 December 2015 12:37 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/188541.jpg) |
Mukul Ahmed
Messages: 16 Registered: December 2015 Location: Bangladesh
|
Junior Member |
|
|
Please, I want to update another table from one table. as like, when I input a room_id in reservation table (:reservation.room_id), then with relation room_id, room table (:room.room_status) will be automatically changed to booked from available. I use checkbox. Failed. Please give me a solution..
|
|
|
|
|
|
Re: Update Another Table [message #646155 is a reply to message #646151] |
Sun, 20 December 2015 12:43 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/188541.jpg) |
Mukul Ahmed
Messages: 16 Registered: December 2015 Location: Bangladesh
|
Junior Member |
|
|
I have a column 'status' in room table. at first, All the room_id status set to available. I wanted to do, when I input a room_id in reservation table, the status of that room will be changed to booked in room table. for this, in reservation block i take a column 'status'. when-valid-item trigger applied, so that when i input a room_id, its status will be shown in reservation.status. I convert the status text item to checkbox. then used when-checkbox-changed trigger
--when-checkbox-changed
begin
if :reservation.(checkbox_name) = 'Booked' then
:room.status :='Booked';
else
:room.status := 'Available';
end if;
end;
It works, if I also convert the :room.status column to checkbox and number of item displayed = 1
Any Other solution please?
[Updated on: Sun, 20 December 2015 12:50] Report message to a moderator
|
|
|