Click here to Skip to main content
11,637,176 members (62,542 online)
   

Database

 
QuestionSQL Storedprocedure trace other than profiler Pin
Member 31370789-Jan-13 20:19
memberMember 31370789-Jan-13 20:19 
AnswerRe: SQL Storedprocedure trace other than profiler Pin
Sandeep Mewara9-Jan-13 21:22
mvpSandeep Mewara9-Jan-13 21:22 
AnswerRe: SQL Storedprocedure trace other than profiler Pin
Mycroft Holmes9-Jan-13 21:29
memberMycroft Holmes9-Jan-13 21:29 
QuestionZombie check on Transaction - How to reproduce it? Pin
Member 31370787-Jan-13 22:32
memberMember 31370787-Jan-13 22:32 
QuestionCassandra or MySQL? Pin
Jassim Rahma7-Jan-13 4:56
memberJassim Rahma7-Jan-13 4:56 
AnswerRe: Cassandra or MySQL? Pin
Mycroft Holmes7-Jan-13 12:01
memberMycroft Holmes7-Jan-13 12:01 
AnswerRe: Cassandra or MySQL? Pin
PIEBALDconsult7-Jan-13 12:53
memberPIEBALDconsult7-Jan-13 12:53 
QuestionOracle Application expres Pin
Fred Andres6-Jan-13 11:52
memberFred Andres6-Jan-13 11:52 
AnswerRe: Oracle Application expres Pin
Chris Meech6-Jan-13 13:57
memberChris Meech6-Jan-13 13:57 
GeneralRe: Oracle Application expres Pin
Fred Andres7-Jan-13 8:32
memberFred Andres7-Jan-13 8:32 
AnswerRe: Oracle Application expres Pin
Shameel7-Jan-13 3:45
memberShameel7-Jan-13 3:45 
GeneralRe: Oracle Application expres Pin
Fred Andres7-Jan-13 8:32
memberFred Andres7-Jan-13 8:32 
QuestionSQL paging with search Pin
Lance Parker6-Jan-13 2:11
memberLance Parker6-Jan-13 2:11 
AnswerRe: SQL paging with search Pin
jschell6-Jan-13 5:19
memberjschell6-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 Pin
Lance Parker7-Jan-13 8:23
memberLance Parker7-Jan-13 8:23 
GeneralRe: SQL paging with search Pin
jschell7-Jan-13 9:12
memberjschell7-Jan-13 9:12 
QuestionI want to ask query related to mysql Pin
manisharathore5-Jan-13 7:32
membermanisharathore5-Jan-13 7:32 
AnswerRe: I want to ask query related to mysql Pin
Mycroft Holmes5-Jan-13 11:03
memberMycroft Holmes5-Jan-13 11:03 
Questionproblem in ado.net with access 2010 Pin
Achilles843-Jan-13 23:20
memberAchilles843-Jan-13 23:20 
AnswerRe: problem in ado.net with access 2010 Pin
Mycroft Holmes4-Jan-13 13:55
memberMycroft Holmes4-Jan-13 13:55 
Questionhow to cast real data type in sql server 2005 Pin
Auf Klarung2-Jan-13 22:55
memberAuf Klarung2-Jan-13 22:55 
QuestionRe: how to cast real data type in sql server 2005 Pin
Eddy Vluggen4-Jan-13 22:52
memberEddy Vluggen4-Jan-13 22:52 
QuestionSql server like clause Pin
rubonkumar28-Dec-12 4:44
memberrubonkumar28-Dec-12 4:44 
AnswerRe: Sql server like clause Pin
Richard MacCutchan28-Dec-12 6:05
mvpRichard MacCutchan28-Dec-12 6:05 
AnswerRe: Sql server like clause Pin
PIEBALDconsult28-Dec-12 6:38
memberPIEBALDconsult28-Dec-12 6:38 
GeneralRe: Sql server like clause Pin
Mike Meinz28-Dec-12 6:49
memberMike Meinz28-Dec-12 6:49 
GeneralRe: Sql server like clause Pin
rubonkumar28-Dec-12 19:08
memberrubonkumar28-Dec-12 19:08 
AnswerRe: Sql server like clause Pin
rajarao3044-Jan-13 0:50
memberrajarao3044-Jan-13 0:50 
QuestionDatabase design question Pin
DavidCrow27-Dec-12 15:22
memberDavidCrow27-Dec-12 15:22 
AnswerRe: Database design question Pin
PIEBALDconsult27-Dec-12 15:52
memberPIEBALDconsult27-Dec-12 15:52 
AnswerRe: Database design question Pin
jschell28-Dec-12 10:16
memberjschell28-Dec-12 10:16 
GeneralRe: Database design question Pin
PIEBALDconsult28-Dec-12 14:42
memberPIEBALDconsult28-Dec-12 14:42 
GeneralRe: Database design question Pin
jschell30-Dec-12 8:28
memberjschell30-Dec-12 8:28 
AnswerRe: Database design question Pin
Mycroft Holmes28-Dec-12 11:05
memberMycroft Holmes28-Dec-12 11:05 
QuestionImporting of Huge fixed width text file in sql server table Pin
ibrahim sharief27-Dec-12 9:24
memberibrahim sharief27-Dec-12 9:24 
AnswerRe: Importing of Huge fixed width text file in sql server table Pin
PIEBALDconsult27-Dec-12 14:08
memberPIEBALDconsult27-Dec-12 14:08 
AnswerRe: Importing of Huge fixed width text file in sql server table Pin
Deepak Kr130-Dec-12 20:29
memberDeepak Kr130-Dec-12 20:29 
AnswerRe: Importing of Huge fixed width text file in sql server table Pin
jschell31-Dec-12 9:14
memberjschell31-Dec-12 9:14 
Questionshow Sum(Balance) as ob on Rows Header and add next rows balance in ob Pin
hadeed147227-Dec-12 6:52
memberhadeed147227-Dec-12 6:52 
AnswerRe: show Sum(Balance) as ob on Rows Header and add next rows balance in ob Pin
djj5527-Dec-12 7:53
memberdjj5527-Dec-12 7:53 
GeneralRe: show Sum(Balance) as ob on Rows Header and add next rows balance in ob Pin
hadeed147227-Dec-12 8:03
memberhadeed147227-Dec-12 8:03 
QuestionSQL BulkCopy using IDataReader - how can you cast the fields? Pin
Allan Watkins26-Dec-12 19:12
memberAllan Watkins26-Dec-12 19:12 
AnswerRe: SQL BulkCopy using IDataReader - how can you cast the fields? Pin
Mycroft Holmes26-Dec-12 20:32
memberMycroft Holmes26-Dec-12 20:32 
GeneralRe: SQL BulkCopy using IDataReader - how can you cast the fields? Pin
AllanW1111127-Dec-12 6:02
memberAllanW1111127-Dec-12 6:02 
AnswerRe: SQL BulkCopy using IDataReader - how can you cast the fields? Pin
PIEBALDconsult27-Dec-12 8:48
memberPIEBALDconsult27-Dec-12 8:48 
QuestionSubquery returns more than 1 row Pin
Jassim Rahma24-Dec-12 1:02
memberJassim Rahma24-Dec-12 1:02 
AnswerRe: Subquery returns more than 1 row Pin
Eddy Vluggen24-Dec-12 1:29
memberEddy Vluggen24-Dec-12 1:29 
AnswerRe: Subquery returns more than 1 row Pin
MaulikDusara24-Dec-12 21:44
memberMaulikDusara24-Dec-12 21:44 
GeneralRe: Subquery returns more than 1 row Pin
Eddy Vluggen25-Dec-12 2:41
memberEddy Vluggen25-Dec-12 2:41 
GeneralRe: Subquery returns more than 1 row Pin
Mycroft Holmes26-Dec-12 11:17
memberMycroft 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
Web04 | 2.8.150728.1 | Last Updated 30 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid