Solved

Creating duplicate record at the end of the block records

Posted on 2004-05-03
4
624 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle Syntax 8 56
select only modified column name  based on the status 15 47
Extract the first word (before the , ) 2 39
constraint check 2 13
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now