Home » Developer & Programmer » Forms » updating a table in a form and create new records (forms 9i)
updating a table in a form and create new records [message #353024] Fri, 10 October 2008 11:34 Go to next message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

Can anyone help me with this?

I have a form that has location, name, title, desciption and an new field I created called description number.

How can I create a procedure to automatically update the records in the table and create new records if more than one desciption number exists for that location. I only need to do this once to update the records stored in this table.
Re: updating a table in a form and create new records [message #353042 is a reply to message #353024] Fri, 10 October 2008 13:42 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This problem doesn't seem to be related to Forms. "Updating" and "creating new records if ..." sounds like a (PL/)SQL problem.

However, I'd say that you need to provide some more information:
  • Update existing records - what columns to what values?
  • How is newly created record supposed to look like?
  • You have created this "description number" columns; how does it get its value?
Re: updating a table in a form and create new records [message #353046 is a reply to message #353042] Fri, 10 October 2008 14:11 Go to previous messageGo to next message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

Update existing records - what columns to what values?

location name title desc desc_num
LOS ANGELES john smith MGR travel allowance 150
NEW ORLEANS jane smith SEC petty cash 200
AUSTIN Annie Smith PROG payroll 350


How is newly created record supposed to look like?
it has all the above information, before it did not have a desc_num

You have created this "description number" columns; how does it get its value?

using a query, however the query sometimes come back with more than one record for a location for example location LOS ANGELES may have all the same information but it has two desc_num a 150 and 151. How can I create a new record if the query shows more than one result and insert it into the about table.
Re: updating a table in a form and create new records [message #353967 is a reply to message #353046] Wed, 15 October 2008 22:54 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Is this a work exercise or a study exercise? Is there anyone around you with whom you can discuss this problem? Do you have a simple form that is able to input and retrieve records from your table?

David
Re: updating a table in a form and create new records [message #354161 is a reply to message #353967] Thu, 16 October 2008 13:24 Go to previous messageGo to next message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

This is a work exercise, no one else around to help, and yes its a simple form that can retrieve and insert from a table. I just want to add a new column and insert new records based on certain criteria, maybe use a loop to search through all existing records.

Thanks for responding.
Re: updating a table in a form and create new records [message #354739 is a reply to message #354161] Tue, 21 October 2008 01:22 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Use PL/SQL for this task not a form.

David
Previous Topic: 'Order by' dynamically thru Forms
Next Topic: Changing LOV parameters at runtime
Goto Forum:
  


Current Time: Fri Sep 27 18:31:15 CDT 2024