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 |
|
Jabez
Starting Member
19 Posts |
Posted - 2007-12-03 : 23:03:04
|
| Hi Folks,How do I right queries to fetch first 10 records, then next 10 and so on..My table structure is as follows:Columns--------MPAD_ID (IDENTITY INCREMENT YES )MPAD_EmpCode (Employee Code)MPAD_Date (Date)MPAD_Status (Attendance Status i.e. P, A, etc)Sample Records for the same is given belowMPAD_ID MPAD_EmpCode MPAD_Date MPAD_Status ------- ------------ ---------- ----------- 1 1001 11/01/2007 P 2 1001 11/02/2007 P 3 1001 11/03/2007 A ... .. .. .. 14 1002 11/01/2007 P 15 1002 11/02/2007 A 16 1002 11/03/2007 PPlease help me out in writing out this query.ThanksJabez. |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
|
|
kiruthika
Yak Posting Veteran
67 Posts |
Posted - 2007-12-04 : 04:35:42
|
| Hi!It's better to do this work through your front end.suppose if you are using.NET then use data grid (paging) option.byKiruthika!http://www.ictned.eu |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2007-12-04 : 08:50:54
|
quote: Originally posted by kiruthika It's better to do this work through your front end.suppose if you are using.NET then use data grid (paging) option.
Of course every implementation needs to be looked at individually but generally speaking there can be good reasons do server side paging. If the user request results in 20,000 rows but the user typically only wants to see the 1st 10 rows then you will move 19,990 rows out to the client unnecessarily.Be One with the OptimizerTG |
 |
|
|
|
|
|