473,387 Members | 1,515 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,387 software developers and data experts.

Need query equivalent to MySQL LIMIT(x,y);

Hi all.,
This is Kesavan.M from India..,
Here I have a table with upto 12 lac records. And I need a query in MS-
Access to SELECT records between 50001-250000 ie Record # 50,000 to
Record #2,50,000.

Important point is unfortunately the table comes with no id or
autonumber..,

So I need a equivalent to MySQL LIMIT(x,y);

The structure of the table is

Name char, RegNo char, Mark1 char,Mark2 char,Mark3 char,Mark4 char,
Result char.

Please help me to rectify this issue.

Thanks & regards

Kesavan.M
m.*******@hotmail.com

May 19 '07 #1
2 3697
SELECT TOP 1000 TABLE_NAME.REGNO
FROM TABLE_NAME
WHERE (((TABLE_NAME.REGNO)>(SELECT MAX(regno) FROM
(SELECT TOP 456789 regno FROM TABLE_NAME ORDER BY regno))))
ORDER BY TABLE_NAME.REGNO;

where x->1000,y->456789

works very fine
On May 19, 12:37 pm, Kesavan Muthuvel <k7.in...@gmail.comwrote:
Hi all.,
This is Kesavan.M from India..,
Here I have a table with upto 12 lac records. And I need a query in MS-
Access to SELECT records between 50001-250000 ie Record # 50,000 to
Record #2,50,000.

Important point is unfortunately the table comes with no id or
autonumber..,

So I need a equivalent to MySQL LIMIT(x,y);

The structure of the table is

Name char, RegNo char, Mark1 char,Mark2 char,Mark3 char,Mark4 char,
Result char.

Please help me to rectify this issue.

Thanks & regards

Kesavan.M
m.kesa...@hotmail.com

May 19 '07 #2
I am glad it does what you want... it apears that, despite your saying there
is no id that "regno" can be used to order the records. But, the fact is
that the records in relational tables, by definition, are unordered -- have
no inherent natural order. You cannot count on the Records being in any
particular order when retrieved unless you use the ORDER BY clause to put
them in order based on the contents of a Field or Fields.

Some desktop database products, and perhaps some that work as server DBs, do
include the concept of a Record Number -- but those do not follow relational
DB principles.

Larry Linson
Microsoft Access MVP

"Kesavan Muthuvel" <k7******@gmail.comwrote in message
news:11**********************@l77g2000hsb.googlegr oups.com...
SELECT TOP 1000 TABLE_NAME.REGNO
FROM TABLE_NAME
WHERE (((TABLE_NAME.REGNO)>(SELECT MAX(regno) FROM
(SELECT TOP 456789 regno FROM TABLE_NAME ORDER BY regno))))
ORDER BY TABLE_NAME.REGNO;

where x->1000,y->456789

works very fine
On May 19, 12:37 pm, Kesavan Muthuvel <k7.in...@gmail.comwrote:
>Hi all.,
This is Kesavan.M from India..,
Here I have a table with upto 12 lac records. And I need a query in MS-
Access to SELECT records between 50001-250000 ie Record # 50,000 to
Record #2,50,000.

Important point is unfortunately the table comes with no id or
autonumber..,

So I need a equivalent to MySQL LIMIT(x,y);

The structure of the table is

Name char, RegNo char, Mark1 char,Mark2 char,Mark3 char,Mark4 char,
Result char.

Please help me to rectify this issue.

Thanks & regards

Kesavan.M
m.kesa...@hotmail.com


May 20 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tim Fountain | last post by:
We've recently enabled slow query logging on a server and it's proving interesting seeing which queries are bogging things down. This one is puzzling me a little: SELECT articleid, type,...
0
by: Troy Hakala | last post by:
Is it possible to limit the query time in MySQL (3.x or 4.0)? For example, I'd like to have any query that takes more than a specified number of seconds just quit automatically. Seems dumb, but on...
0
by: Jesse Sheidlower | last post by:
I'm struggling with speed issues on some queries that I would have expected to be relatively fast. Perhaps even more frustratingly, when I've tried to break these down into their components, they...
1
by: Craig Stadler | last post by:
mySQL win32 (4.0.22) I am using mySQL Control Admin and seeing a lockup on a thread specific to a like query. select * from table1 where field1 like 'http://h%' limit 100 This request will...
4
by: emily_g107 | last post by:
Hi, I need to limit results in the following query type: ...
1
by: SC | last post by:
I'm developing a site that may eventually have a very large database of users (hopefully, but who knows). It will be a community website where users can search each other (think Friendster,...
4
by: roman.ali | last post by:
Hi, I am using a .dqy file to import some rows from a sql server 2003 database to microsoft excel. Unfortunately, I have am importing more rows than excel can handle. Is there a way around...
2
by: milo1955 | last post by:
I have a form that passes a single variable via the GET function to a mysql databse query with the results paginated. The first page of the results work fine, but the link to the second page yields...
1
by: acornejo | last post by:
Hi All I've the following code I need to optimize. Currently tblOutgoing is about 250K registers and growing at a rate of about 20k records per day. This code takes me over 5 secs to run on each...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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 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.