Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Split records

by jarich (Curate)
on Feb 19, 2004 at 09:19 UTC ( [id://330180]=note: print w/replies, xml ) Need Help??


in reply to Split records

Welcome to the monastery dafi!

There are some things you should know before you get really settled in here. Many of us here really want to help you out, we're very eager in fact. However we can't read your mind so we'll need you to tell us lots of things that are relevant to the problem.

If you want a good idea of what we want from you, check out the Welcome to the Monastery tutorials. These cover lots of useful hints on how you can help us help you, and then later, how you can help us help us.

Now with respect to your specific problem I suspect the answer your looking for is to use LIMIT and OFFSET. The exact way to use these depend on your database. I've never used Oracle so I can't tell you exactly.

It's probably something like this though:

select username, firstname, surname from users limit 10 offset 20;
This will give you numbers 21-30.

Please read over the tutorials, it'll make your experiences here much more enjoyable.

Hope this helps,

jarich

Replies are listed 'Best First'.
Re: Split records
by Abigail-II (Bishop) on Feb 19, 2004 at 09:54 UTC
    It's probably something like this though:
    select username, firstname, surname from users limit 10 offset 20;
    This will give you numbers 21-30.
    Yeah, except that if you change offset to 150, you might get the same results. In a different order. You do need to order your results to have some chance of a meaningful result. And just pray that between invocations, noone deleted or added records.

    Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://330180]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found