473,320 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

obtaining 5th record for each id when there are different numbers records for each id

Hello,

I am attempting to obtain the 5th record for each id in a query.

Sometimes there will be 5, 6 or 7 records under the id, depending on when/whether there has been a death.

The id is a primary key in a separate table, with an autoid in this table. However, due to the varying number of records per id I can't find anywhere that says how to get the nth record connected to id, only the nth record using autoid and if I have made myself clear enough it can be seen that this wouldn't give me the information I require!

Any help would be most appreciated, thank you in advance.

Lizy
Feb 17 '11 #1
2 1358
Also I would like the query to show the id and the rest of the information from each 5th record...
Feb 17 '11 #2
Rabbit
12,516 Expert Mod 8TB
You could use a ranking subquery in the where clause to return just the record whose rank is 5.
Feb 17 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Matthew Louden | last post by:
I want to create ASP page that shows the schedule of TV station. Since each day's (Monday - Sunday) schedule is different, and I want each day will display the schedule on that day of a week. I...
2
by: crcucb | last post by:
I know Access struggels with having a different look in each record in a continuous form. I am looking to work with a list of data and have some records indented, to designate they belong under...
1
by: Terry Mulvany | last post by:
Grettings, Normally I can use Request.RawUrl to get the 'current' page (amongst many other things). But in the case of using a Server.Transfer but the path from the root of the site . So if...
2
by: Rich | last post by:
Here is what I am trying for randomizing 2 numbers in the same subroutine so that they are not equal to each other: Dim j As Integer, k As Integer j = New System.Random().Next(0, 10) k = New...
1
by: Wally | last post by:
I am after VB.net code for a random number generator that will generate 10 different numbers between 1 and 10 and put them into an array. For example I want the output to be something like...
9
by: serge | last post by:
/* Subject: How to build a procedure that returns different numbers of columns as a result based on a parameter. You can copy/paste this whole post in SQL Query Analyzer or Management Studio...
10
by: MLH | last post by:
Suppose, in a multi-user environment, you have append query SQL in a VBA procedure that looks like INSERT INTO MyTable... and the next line reads MyVar=DMax("","MyTable... You can never be...
2
by: amitsaxena1981 | last post by:
hi, I m using asp.net2005 with vb.net ,I have to create gridview user control so I want to drag and drop a record to a different position in same gridview without using third party control,...
2
by: amitsaxena1981 | last post by:
hi, I am using asp.net2.0 with vb.net , I have to create gridview user control and I want to drag and drop a record to a different position in the same Gridview using AJAX .Is it possible to...
12
by: CindySue | last post by:
I would like to be able to copy the current record to a different table. I am tracking donations and I create a new table of donations each year--some of the records will be the same or slightly...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.