Click here to Skip to main content
       

Database

 
QuestionSQL Storedprocedure trace other than profiler PinmemberMember 31370789-Jan-13 20:19 
AnswerRe: SQL Storedprocedure trace other than profiler PinmvpSandeep Mewara9-Jan-13 21:22 
AnswerRe: SQL Storedprocedure trace other than profiler PinmemberMycroft Holmes9-Jan-13 21:29 
QuestionZombie check on Transaction - How to reproduce it? PinmemberMember 31370787-Jan-13 22:32 
QuestionCassandra or MySQL? PinmemberJassim Rahma7-Jan-13 4:56 
AnswerRe: Cassandra or MySQL? PinmemberMycroft Holmes7-Jan-13 12:01 
AnswerRe: Cassandra or MySQL? PinmemberPIEBALDconsult7-Jan-13 12:53 
QuestionOracle Application expres PinmemberFred Andres6-Jan-13 11:52 
AnswerRe: Oracle Application expres PinmemberChris Meech6-Jan-13 13:57 
GeneralRe: Oracle Application expres PinmemberFred Andres7-Jan-13 8:32 
AnswerRe: Oracle Application expres PinmemberShameel7-Jan-13 3:45 
GeneralRe: Oracle Application expres PinmemberFred Andres7-Jan-13 8:32 
QuestionSQL paging with search PinmemberLance Parker6-Jan-13 2:11 
AnswerRe: SQL paging with search Pinmemberjschell6-Jan-13 5:19 
Lance Parker wrote:
Is there a way of replicating this behavior in SQL o

 
Your question about what "behavior" you want to replicate is confusing but yes you can implement paging in SQL.
 
Basic steps.
1. Create your SQL with appropriate search parameters. You should still use parametrized values.
...a. If you have just a couple of items you can hard code the SQL.
...b. With more than a couple items create the SQL dynamically.
2. Apply appropriate ordering to the SQL. This can include creating it dynamically.
3. Apply paging (dynamic SQL again) See the following link
 
SQL Server 2005 Paging Results[^]
 

At the business level you might also want to consider what happens to paging if the data being paged changes underneath. Very common answers are
1. It won't, so there is no problem.
2. It won't in relation to the user because the work flow and usage insures that.
 
Be VERY sure that you analyze this at the business level before deciding that this could be a problem.
 
Also you should require sufficient search constraints to insure that no single result has lot of pages. Three pages is ok, 100 isn't. If someone claims otherwise then note that users do not randomly seek data. They know what they are looking for. So make them tell you it. Paging is a convenience so they don't have to tell you everything in detail but ignoring it can inhibit rather than help workflow.
GeneralRe: SQL paging with search PinmemberLance Parker7-Jan-13 8:23 
GeneralRe: SQL paging with search Pinmemberjschell7-Jan-13 9:12 
QuestionI want to ask query related to mysql Pinmembermanisharathore5-Jan-13 7:32 
AnswerRe: I want to ask query related to mysql PinmemberMycroft Holmes5-Jan-13 11:03 
Questionproblem in ado.net with access 2010 PinmemberAchilles843-Jan-13 23:20 
AnswerRe: problem in ado.net with access 2010 PinmemberMycroft Holmes4-Jan-13 13:55 
Questionhow to cast real data type in sql server 2005 PinmemberAuf Klarung2-Jan-13 22:55 
QuestionRe: how to cast real data type in sql server 2005 PinmemberEddy Vluggen4-Jan-13 22:52 
QuestionSql server like clause Pinmemberrubonkumar28-Dec-12 4:44 
AnswerRe: Sql server like clause PinmvpRichard MacCutchan28-Dec-12 6:05 
AnswerRe: Sql server like clause [modified] PinmemberPIEBALDconsult28-Dec-12 6:38 
GeneralRe: Sql server like clause PinmemberMike Meinz28-Dec-12 6:49 
GeneralRe: Sql server like clause Pinmemberrubonkumar28-Dec-12 19:08 
AnswerRe: Sql server like clause Pinmemberrajarao3044-Jan-13 0:50 
QuestionDatabase design question PinmemberDavidCrow27-Dec-12 15:22 
AnswerRe: Database design question PinmemberPIEBALDconsult27-Dec-12 15:52 
AnswerRe: Database design question Pinmemberjschell28-Dec-12 10:16 
GeneralRe: Database design question PinmemberPIEBALDconsult28-Dec-12 14:42 
GeneralRe: Database design question Pinmemberjschell30-Dec-12 8:28 
AnswerRe: Database design question PinmemberMycroft Holmes28-Dec-12 11:05 
QuestionImporting of Huge fixed width text file in sql server table Pinmemberibrahim sharief27-Dec-12 9:24 
AnswerRe: Importing of Huge fixed width text file in sql server table PinmemberPIEBALDconsult27-Dec-12 14:08 
AnswerRe: Importing of Huge fixed width text file in sql server table PinmemberDeepak Kr130-Dec-12 20:29 
AnswerRe: Importing of Huge fixed width text file in sql server table Pinmemberjschell31-Dec-12 9:14 
Questionshow Sum(Balance) as ob on Rows Header and add next rows balance in ob Pinmemberhadeed147227-Dec-12 6:52 
AnswerRe: show Sum(Balance) as ob on Rows Header and add next rows balance in ob Pinmemberdjj5527-Dec-12 7:53 
GeneralRe: show Sum(Balance) as ob on Rows Header and add next rows balance in ob Pinmemberhadeed147227-Dec-12 8:03 
QuestionSQL BulkCopy using IDataReader - how can you cast the fields? PinmemberAllan Watkins26-Dec-12 19:12 
AnswerRe: SQL BulkCopy using IDataReader - how can you cast the fields? PinmemberMycroft Holmes26-Dec-12 20:32 
GeneralRe: SQL BulkCopy using IDataReader - how can you cast the fields? PinmemberAllanW1111127-Dec-12 6:02 
AnswerRe: SQL BulkCopy using IDataReader - how can you cast the fields? PinmemberPIEBALDconsult27-Dec-12 8:48 
QuestionSubquery returns more than 1 row PinmemberJassim Rahma24-Dec-12 1:02 
AnswerRe: Subquery returns more than 1 row PinmemberEddy Vluggen24-Dec-12 1:29 
AnswerRe: Subquery returns more than 1 row PinmemberMaulikDusara24-Dec-12 21:44 
GeneralRe: Subquery returns more than 1 row PinmemberEddy Vluggen25-Dec-12 2:41 
GeneralRe: Subquery returns more than 1 row PinmemberMycroft Holmes26-Dec-12 11:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 18 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid