Board index » delphi » Limiting the number of records in a query (Urgent - please help)

Limiting the number of records in a query (Urgent - please help)

Hi everyone,

I use SQL in a query to get a sorted list of records, Is there any way to
limit the number or records to a particular number.

The following SQL statement is used in the query

SELECT ID, CallDate, StartTime, Duration, Extension, Line, NumberDialled,
PIN, CallType, Cost
FROM Cdr
ORDER BY Extension, Duration

I just want say the 100 records with least duration .

Thanks in advance,

Sunish

 

Re:Limiting the number of records in a query (Urgent - please help)


As a work-around, after you issue your query, open it, do a MoveBy(100),
grab the current duration and reissue the query using that value as a
parameter.

Paul / ColumbuSoft

Quote
Sunish Issac <isunm...@bigfoot.com> wrote in message

news:89m866$93v10@news.emirates.net.ae...
Quote
> Hi everyone,

> I use SQL in a query to get a sorted list of records, Is there any way to
> limit the number or records to a particular number.

> The following SQL statement is used in the query

> SELECT ID, CallDate, StartTime, Duration, Extension, Line, NumberDialled,
> PIN, CallType, Cost
> FROM Cdr
> ORDER BY Extension, Duration

> I just want say the 100 records with least duration .

> Thanks in advance,

> Sunish

Re:Limiting the number of records in a query (Urgent - please help)


If you have the Enterprise edition you can use clientdatasets which have
the PacketRecords property which limit the number of records returned by
a query.

Message by Sunish Issac <isunm...@bigfoot.com> on: 3/2/00 9:33:24 PM

Quote
>Hi everyone,

>I use SQL in a query to get a sorted list of records, Is there any way to
>limit the number or records to a particular number.

>The following SQL statement is used in the query

>SELECT ID, CallDate, StartTime, Duration, Extension, Line, NumberDialled,
>PIN, CallType, Cost
>FROM Cdr
>ORDER BY Extension, Duration

>I just want say the 100 records with least duration .

>Thanks in advance,

>Sunish

Other Threads