Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
CrazyT
Yak Posting Veteran
73 Posts |
Posted - 2010-04-01 : 15:58:51
|
| I have a large database I want to loop through. How can i make a query that returns the data in groups of 50? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-01 : 16:00:43
|
| use ROW_NUMBER() and GROUP BY. thats all we can say as per brief info posted------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
CrazyT
Yak Posting Veteran
73 Posts |
Posted - 2010-04-01 : 16:49:05
|
| i think rownumber will give me the result i want. i want to loop the database and get groups on 10 record.guess i'll just have to pass the start/finish record |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-02 : 02:01:49
|
quote: Originally posted by CrazyT i think rownumber will give me the result i want. i want to loop the database and get groups on 10 record.guess i'll just have to pass the start/finish record
we also can only guess from the amount of info you posted. why dont you post table structure with some sample data if you need more specific help?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|