Duplicate Record [message #180053] |
Fri, 30 June 2006 00:22 |
kamran.it
Messages: 265 Registered: September 2005 Location: Karachi
|
Senior Member |
|
|
I have enter one reocrd is there any possibity that when i go for enter new record prv. record (duplicate) show me because many text same as prv. record.
|
|
|
|
Re: Duplicate Record [message #180062 is a reply to message #180054] |
Fri, 30 June 2006 01:23 |
kamran.it
Messages: 265 Registered: September 2005 Location: Karachi
|
Senior Member |
|
|
I tried but shows error
FRM-41802 Duplicate record function allowed on new record
and when I inserted new recored after that:-
FRM-41803 No previous record to copy value form
|
|
|
|
|
|
|
Re: Duplicate Record [message #180129 is a reply to message #180127] |
Fri, 30 June 2006 04:23 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
kamran.it wrote on Fri, 30 June 2006 11:14 | Thank You
I am waiting....
| Waiting? No, you should be programming! Your procedure won't write itself! Although I have a pretty wide imagination I am not psychic and I don't have a crystal ball so I can't write it for you. Besides, a small procedure with 2 inserts can't be that hard.
possible framework |
procedure dup_rec(<p_master_key> in <master_key_type>)
is
<v_new_key> <master_key_type>;
begin
-- create a master
INSERT INTO <master_table>(<columns>)
SELECT <columns>
FROM <master_table>
WHERE <master_key> = <p_master_key>
RETURNING <new_key> INTO <v_new_key>;
-- create details
INSERT INTO <detail_table>(<columns>,...., <master_key>)
SELECT <columns>,.....,<v_new_key>
FROM <detail_table>
WHERE <master_key> = <p_master_key>;
EXCEPTION
<your_exception_handling>
end dup_rec;
|
Off you go.
MHE
[Updated on: Fri, 30 June 2006 04:26] Report message to a moderator
|
|
|
Re: Duplicate Record [message #180157 is a reply to message #180129] |
Fri, 30 June 2006 07:14 |
kamran.it
Messages: 265 Registered: September 2005 Location: Karachi
|
Senior Member |
|
|
Yes , I tried to do programming actual I get new ideas from here I learn oracle through web and orafaq.com I dont have much exp. in oracle recently 3 mmonths, i am using oracle.
|
|
|
Re: Duplicate Record [message #180160 is a reply to message #180157] |
Fri, 30 June 2006 07:37 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
And did the template help? If you have written your procedure you simply call it from forms (create a button for it, or a menu item).
MHE
|
|
|