Home » Developer & Programmer » Forms » Need to perform multiple insertion (Oracle forms 10g,Oracle 7 database, Win 7 )
Need to perform multiple insertion [message #645767] Mon, 14 December 2015 17:47 Go to next message
shumail
Messages: 149
Registered: September 2012
Location: Canada
Senior Member
Hi all

Appreciate if someone help me out. I have a database block in my form and its style is Forms not tabular.
When I insert record in that form and then save it then it will create a single record in table XYZ, now my requirement is that when I save record then in database table more than 1 record save instead of 1 record by using some condition like below:
block name=job

If :job.fine_amt > 0 then 
insert into XYZ 
values
(all forms values)
end if;
--------------
If :job.sutt_amt > 0 then 
insert into XYZ 
values
(all forms values)
end if;



Thanks

Regards
Shumail
Re: Need to perform multiple insertion [message #645783 is a reply to message #645767] Tue, 15 December 2015 00:08 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There's no difference in those two statements; in both cases you are inserting the same values.

By the way, what do you call "all forms values"? COMMIT will save all form values anyway.
Re: Need to perform multiple insertion [message #645787 is a reply to message #645767] Tue, 15 December 2015 02:11 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Can't you use a simple multitable insert? INSERT ALL WHEN ...
Re: Need to perform multiple insertion [message #645790 is a reply to message #645787] Tue, 15 December 2015 03:14 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Doubt it. Looks like OP wants to insert additional records into the same table the block is based on.
Since forms will insert the main record from the block anyway an additional insert in post-insert should be all that's needed.

If not then the OP will need to explain the problem in more detail.
Re: Need to perform multiple insertion [message #651259 is a reply to message #645790] Fri, 13 May 2016 11:50 Go to previous message
shumail
Messages: 149
Registered: September 2012
Location: Canada
Senior Member
Thanks for the replies, as cookiemonster suggested, I use post insert trigger to insert additional records in my required table. Thanks for your help
Previous Topic: Run a form in Netscape
Next Topic: Insert and update
Goto Forum:
  


Current Time: Thu Mar 28 03:44:34 CDT 2024