Solved

Creating duplicate record at the end of the block records

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle Next Available Number 2 41
Fastest way to replace data in Oracle 5 62
join 2 views with 5 conditions 3 54
Include a logo in email body using Oracle utl_mail 11 30
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to recover a database from a user managed backup

776 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