Click here to Skip to main content
15,899,937 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to Transfer SQl Database to a Cd and be Opened with SQl on the other side Pin
Vimalsoft(Pty) Ltd31-May-07 2:38
professionalVimalsoft(Pty) Ltd31-May-07 2:38 
GeneralRe: How to Transfer SQl Database to a Cd and be Opened with SQl on the other side Pin
Colin Angus Mackay31-May-07 4:15
Colin Angus Mackay31-May-07 4:15 
GeneralRe: How to Transfer SQl Database to a Cd and be Opened with SQl on the other side Pin
Vimalsoft(Pty) Ltd31-May-07 4:25
professionalVimalsoft(Pty) Ltd31-May-07 4:25 
QuestionSplit it Pin
The_Server31-May-07 0:10
The_Server31-May-07 0:10 
AnswerRe: Split it Pin
Tirthadip31-May-07 1:28
Tirthadip31-May-07 1:28 
AnswerRe: Split it Pin
Kirtan Gor31-May-07 1:40
Kirtan Gor31-May-07 1:40 
QuestionRe: Split it [modified] Pin
The_Server31-May-07 2:25
The_Server31-May-07 2:25 
AnswerRe: Split it Pin
Harini N K4-Jun-07 0:56
Harini N K4-Jun-07 0:56 
Hi
It can be done.

Calculate startpage and endpage using the parameters @rows & @currentpage.

You need to pass two values from the front-end that is current page and number of rows per page.

See below example with paging condition and I used temporary tables with identity column for filtering pages.

Hope you got it.

<br />
<br />
use northwind<br />
go<br />
<br />
--create temporary table to store all rows with identity column or serial number for page filter <br />
CREATE TABLE #OrdersPage ([Iden] [int] IDENTITY(1,1) NOT NULL, OrderId int,CustomerID nchar(10))<br />
<br />
declare @startpage int<br />
declare @endpage int<br />
declare @rows int<br />
declare @currentpage int<br />
<br />
set @rows = 10 -- number of rows per page from the front end<br />
set @currentpage = 1  -- pass current page from the front end<br />
<br />
set @endpage = (@rows * @currentpage) + 1<br />
set @startpage = @endpage - @rows<br />
<br />
print @startpage <br />
print @endpage <br />
<br />
insert into #OrdersPage <br />
select top 50 OrderID, CustomerID from Orders<br />
<br />
select * from #OrdersPage where Iden >= @startpage and Iden < @endpage <br />
-- set paging condition here using the column 'Iden' from the temporary table<br />
<br />
drop table #OrdersPage<br />
<br />


Harini

AnswerRe: Split it Pin
The_Server6-Jun-07 20:07
The_Server6-Jun-07 20:07 
QuestionDataSet Fill Problem Pin
Kirtan Gor30-May-07 22:52
Kirtan Gor30-May-07 22:52 
QuestionSQL statement returning duplicates with DISTINCT [modified] Pin
ScottM130-May-07 22:01
ScottM130-May-07 22:01 
AnswerRe: SQL statement returning duplicates with DISTINCT Pin
kubben31-May-07 3:11
kubben31-May-07 3:11 
GeneralRe: SQL statement returning duplicates with DISTINCT Pin
ScottM131-May-07 3:24
ScottM131-May-07 3:24 
Questionnormailzation? Pin
saravanan0530-May-07 20:48
saravanan0530-May-07 20:48 
AnswerRe: normailzation? Pin
ScottM130-May-07 21:44
ScottM130-May-07 21:44 
QuestionDate format in T-SQL Pin
Werries30-May-07 12:02
Werries30-May-07 12:02 
AnswerRe: Date format in T-SQL Pin
Werries30-May-07 12:19
Werries30-May-07 12:19 
AnswerRe: Date format in T-SQL Pin
Mike Dimmick30-May-07 23:05
Mike Dimmick30-May-07 23:05 
QuestionConnect to a database Pin
Aptiva Dave30-May-07 5:54
Aptiva Dave30-May-07 5:54 
AnswerRe: Connect to a database Pin
Nouman Bhatti31-May-07 2:55
Nouman Bhatti31-May-07 2:55 
GeneralRe: Connect to a database Pin
Aptiva Dave31-May-07 5:09
Aptiva Dave31-May-07 5:09 
GeneralRe: Connect to a database Pin
Paul Conrad1-Jun-07 7:22
professionalPaul Conrad1-Jun-07 7:22 
AnswerRe: Connect to a database Pin
ganti.r7-Jun-07 1:50
ganti.r7-Jun-07 1:50 
QuestionSetFieldValue() Pin
hero199529-May-07 22:43
hero199529-May-07 22:43 
QuestionINSERT - Date/Time INTO SQL ?? Pin
Fritzables29-May-07 21:44
Fritzables29-May-07 21:44 

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

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