WINDOWS XP, Access 2003
I have a query that lists certain amounts as follows
Select a,b,c, amount
from table
ordered by amount.
Now i've been asked to produce a list of every n-th record in that list (preferably in such a way as to be able to reproduce the selection identically to previous selections, also n should be entered manually).
Any suggestions as how to do this ?
4 2555
WINDOWS XP, Access 2003
I have a query that lists certain amounts as follows
Select a,b,c, amount
from table
ordered by amount.
Now i've been asked to produce a list of every n-th record in that list (preferably in such a way as to be able to reproduce the selection identically to previous selections, also n should be entered manually).
Any suggestions as how to do this ?
-
SELECT a,b,c, amount
-
FROM Table
-
WHERE ((([myindex]-1) Mod [enter Nth]=0));
-
-
SELECT a,b,c, amount
-
FROM Table
-
WHERE ((([myindex]-1) Mod [enter Nth]=0));
-
Thank you for this solution.
My problem being that there is not really an index since the fields need to be ordered by a series of other fields (i failed to mention this in the initial question, a,b and c).
I gues I'll just have to create an index unless someone has another solution.
NeoPa 32,556
Expert Mod 16PB
The only solution I can think of is to process through the recordset in code. Unfortunately, this cannot be used as the Record Source for objects like forms or reports.
Essentially, an RDBMS is designed to treat each record as a unique item and so the idea of ordinal numbers (1st; 2nd; 3rd; 4th; etc), or anything that is positionally relative is anathema (It doesn't make sense within that scenario).
Sometimes, tricks can be used to imitate what's required, but I can't see a useful one here.
The only solution I can think of is to process through the recordset in code. Unfortunately, this cannot be used as the Record Source for objects like forms or reports.
Essentially, an RDBMS is designed to treat each record as a unique item and so the idea of ordinal numbers (1st; 2nd; 3rd; 4th; etc), or anything that is positionally relative is anathema (It doesn't make sense within that scenario).
Sometimes, tricks can be used to imitate what's required, but I can't see a useful one here.
>>The only solution I can think of is to process through the recordset in code
If a temp table was used to store every nth record while cycling through a recordset, then that could be used as the source for a form or report.
J
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Henry Hartley |
last post by:
I've got a PHP system working on a development server (Windows
2000/IIS5/PHP 4.3.3) but it doesn't seem to be working quite right on
the testing server (same except PHP 4.2.3). I upgraded the PHP...
|
by: pigeon |
last post by:
I have 2 users that their client software must be going crazy.. they
are sending packets every .02 seconds to the db server... I know this
because I stuck a sniffer on teh traffic.. but now i just...
|
by: The Bicycling Guitarist |
last post by:
Oh lords and ladies of ciwah,
I have already been told by one person that the <h1> on my home page doesn't
look like proper semantic markup to them. That person suggested a <p> with
style by CSS....
|
by: Open Minded111 |
last post by:
***this isn't spam. I am actually just a dude who wrote an ebook and i
want to share it with as many people as might benefit from it. I come
in peace!***
Its well known that the path to...
|
by: Steve Jacobs |
last post by:
Hi,
I need to run a vb.net or aspx.net file every 10 seconds. The Task Scheduler
in Windows 2003 Server can only do it every 1 minute at the minimum, but I
need it every 10 seconds. Is it...
|
by: Dave |
last post by:
Hey all,
I have a problem and I can't find anything on the net to really address
it. We have a program at work that has lots of numbers on the front of
the form because it is a control program...
|
by: rahismailbox |
last post by:
I need to run a script in every 10 seconds in background of the site
of 10-15 php pages.
So how do i activate that script?
Is there a code to be embedded in every php page so that the script
got...
|
by: alivip |
last post by:
I write code to get most frequent words in the file
I won't to implement bigram probability by modifying the code to do the following:
How can I get every Token (word) and ...
|
by: ShadowLocke |
last post by:
Hi,
I have an HTML button that i want to execute javascript on every mouse down that occurs. I'v tried using the onmousedown and the onclick events but the button only executes on every second...
|
by: Frank Lund |
last post by:
Should we call .Dispose() every chance we get... on every object that
exposes .Dispose()... and every time we have such an object?
For example, is it true that *every* time I create a DataTable...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |