Home » Developer & Programmer » Forms » Insert/Update by Oracle form
icon9.gif  Insert/Update by Oracle form [message #330309] Sun, 29 June 2008 05:24 Go to next message
ziauldba
Messages: 55
Registered: January 2007
Location: Bangladesh
Member

Dear frands,
i have an daily_attendance table...
i need employee leave after Approved..
there is one or more data....
if data is already then update leave data to daily_attendance table
if data is not there then insert leave data to daily_attendance

How can i Insert and update in single procedure... Sad

Re: Insert/Update by Oracle form [message #330345 is a reply to message #330309] Sun, 29 June 2008 16:08 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
If I understand correctly, you have a block on a table....when you want to insert some records. It need to check for the existence and it has to update, if it is already exists. Otherwise it has to insert.

In that case you can use ON-INSERT trigger to cross check the data and update or insert on the decision made by your select.

By
Vamsi
Re: Insert/Update by Oracle form [message #330361 is a reply to message #330309] Sun, 29 June 2008 22:29 Go to previous messageGo to next message
urnikhil
Messages: 42
Registered: March 2008
Member
If it's a database block, forms will take care of that for you. If you are manually updating the table data u can use a "MERGE" statement.

- Nik.
icon9.gif  Re: Insert/Update by Oracle form [message #330460 is a reply to message #330309] Mon, 30 June 2008 04:10 Go to previous messageGo to next message
ziauldba
Messages: 55
Registered: January 2007
Location: Bangladesh
Member

Dear Friends....

I have a "Employee_leave" table with-
--'Leave_id'
--'to_date'
--'from_date'
--'no_of_days' columns.
this table is updated by oracle block when commit the employee leave block.

I have another "Emp_Daily_Attendance" table
with some columns.

I try to insert or update the "Emp_Daily_Attendance" table when
commit data to the "Employee_leave" block.


---More details i import a jepg file pls help me. Sad






  • Attachment: image.JPG
    (Size: 49.78KB, Downloaded 158 times)
Re: Insert/Update by Oracle form [message #337168 is a reply to message #330460] Wed, 30 July 2008 01:38 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Previous Topic: How to update detail records when master record changes
Next Topic: Web_util Help
Goto Forum:
  


Current Time: Sat Dec 10 18:53:13 CST 2016

Total time taken to generate the page: 0.06084 seconds