Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle ASP
| Search | Today's Posts | Mark Forums Read
Oracle ASP Using ASP with Oracle databases. For Oracle discussions not specific to ASP, please see the Oracle forum. For more ASP discussions, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 6th, 2007, 01:50 AM
Authorized User
 
Join Date: Mar 2006
Location: pune, Maharashtra, India.
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to anup_daware Send a message via MSN to anup_daware Send a message via Yahoo to anup_daware
Default Query to retrieve the first 10 records inserted

I need to write a query/stored procedure where I want to get a specific number for records (say 10) from the database according to the time they are inserted into DB.
I store the insert time using SYSDATE and I want to retrieve the first ten inserted records (i.e. having smallest SYSDATE value) and then delete those from DB in one transaction.
If my table looks something like this:
RecordNum RecordType InsertTime
10 A 10/08/2007 14:20
20 B 10/08/2007 14:22
30 A 10/08/2007 14:27
… … …

Please let me know how to go about it.
Thanks,
Anup



--Everything you can imagine is real.--
__________________
--Everything you can imagine is real.--


Similar Threads
Thread Thread Starter Forum Replies Last Post
delay trigger until all records are inserted rob209 SQL Server 2000 5 March 26th, 2013 06:17 AM
Double records inserted when using Insert Sach Classic ASP Databases 4 March 7th, 2006 02:29 PM
extracting last set of inserted records s_a_ravi Oracle 3 April 14th, 2005 02:14 AM
Retrieve SOME records jaywhy13 Classic ASP Basics 1 January 31st, 2005 12:50 AM
Retrieve top 10 bmains XSLT 1 January 5th, 2004 02:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.