Thank you Adam & Dan,
I am using sql 2000 and I couldn't get your example
to run but modifying it using the "IN" keyword it does! is this ok ? (it works)
select top 10 id, (select count(id) from myTable) as totalRecords
from myTable
where id IN (select top 20 id
from myTable
brevity.
-Dan
>-Original Message-
>From: Adam Churvis [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, March 28, 2006 11:46 PM
>To: CF-Talk
>Subject: Re: DB Pagination Question
>
>Andrew,
>
>Don't use RecordCount on a query that returns the actual rows. Instead,
>per
Tuesday, March 28, 2006 8:53 PM
Subject: Re: DB Pagination Question
Dan, thanks for posting. Presumably you need to do another query initially to
determine how many pages potentially to display dependent on the recordcount?
(ie if there were 1000 records (recordcount?) and you elected
Dan, thanks for posting. Presumably you need to do another query initially to
determine how many pages potentially to display dependent on the recordcount?
(ie if there were 1000 records (recordcount?) and you elected to display 10
records/page that would be 100 pages).
Andrew.
>You can do it
ragon Alliance Founding Committee
>
>
>
>Get advanced intensive Master-level training in
>C# & ASP.NET 2.0 for ColdFusion Developers at
>ProductivityEnhancement.com
>
> - Original Message -
> From: Jim Curran
> To: CF-Talk
> Sent: Monday, March 27, 200
Developers at
ProductivityEnhancement.com
- Original Message -
From: Jim Curran
To: CF-Talk
Sent: Monday, March 27, 2006 1:27 PM
Subject: RE: DB Pagination Question
No,
MSSQL 2000
-Original Message-
From: Adam Churvis [mailto:[EMAIL PROTECTED]
Sent: Monday, March 27
EMAIL PROTECTED]
Sent: Monday, March 27, 2006 1:49 PM
To: CF-Talk
Subject: Re: DB Pagination Question
Jim Curran wrote:
>what is the most efficient way to paginate through the results, without
>hogging memory or re-running the entire query for each page view?
>
>
Unfortunately, I belie
Jim Curran wrote:
>what is the most efficient way to paginate through the results,
>without hogging memory or re-running the entire query for each page view?
>
>
Unfortunately, I believe those are your only two options. You either
cache the query into resident memory (memory hog) or you run the
No,
MSSQL 2000
-Original Message-
From: Adam Churvis [mailto:[EMAIL PROTECTED]
Sent: Monday, March 27, 2006 1:14 PM
To: CF-Talk
Subject: Re: DB Pagination Question
Are you using SQL Server 2005?
Respectfully,
Adam Phillip Churvis
Certified Advanced ColdFusion MX 7 Developer
Are you using SQL Server 2005?
Respectfully,
Adam Phillip Churvis
Certified Advanced ColdFusion MX 7 Developer
BlueDragon Alliance Founding Committee
Get advanced intensive Master-level training in
C# & ASP.NET 2.0 for ColdFusion Developers at
ProductivityEnhancement.com
- Original Messa
10 matches
Mail list logo