Solved

Creating duplicate record at the end of the block records

Posted on 2004-05-03
4
631 Views
Last Modified: 2012-06-22
Hi,

I have such a problem.
When pressing duplicate record  need a duplicate record to be created after the last record in the block. The same thing i have to do when pressing insert record.
What should i write in key-duprec trigger?
Thanks.
0
Comment
Question by:sky_lt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 35

Accepted Solution

by:
Mark Geerlings earned 50 total points
ID: 10981775
To create a duplicate record, you simply have to put this in the key-duprec trigger:
duplicate_record;

Be aware though, that this is not limited to creating a duplicate "after the last record in the block".  The operator could press this on any record, if the default "insert record" functionality is available.

Do you want that trigger functionality changed also, so the cursor advances to the last record first, then does a "dup-rec"?  If so, then your key-crerec trigger should be:
last_record;
duplicate_record;

I'm curious though, what is significant about the "last" record that should be duplicated rather than another record in the block?  What happens if a user queries only some of the exisiting records in the table, then calls this trigger?  What if two people query all of the records at the same time, then they each call this trigger?  Must the form (or the user) modify this duplicated record before it gets saved?  If not, are you saying the table allows duplicates?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
pl/sql parameter is null sometimes 2 40
Oracle Mulit-site configuration 28 74
oracle forms question 9 40
oracle sql developer + get hour from datetime field 2 26
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question