By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,778 Members | 1,318 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,778 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.