🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #1218

Re: select SOMETHING from AnotherQuery

#1218
From: Harold Howe (TeamB)
Date: Wed, 05 Apr 2000 00:00
19 lines
1254 bytes
Paolo Polce wrote in message <38eb0797@dnews>...
>
>  I Have a TQuery component with an sql statement like "select * from
>myTable where etc etc ... order by etc etc...."
>The result is a table of 3000 thousand records...
>Now, I need only the first 2000 records... and I need to order them...


The ordering can be achieved in the original query (hopefull). To filter out
the unwanted records, you can use the Filter and Filtered properties.

Or you can use an in-memory dataset, such as TClientDataset. Loop through
your query and copy the records you want to keep over to the clientdataset.
Clientdataset can also help the sorting issue because it allows you to add
indexes on the fly.

Harold Howe [TeamB]
http://www.bcbdev.com
Technical Details
Message-ID: <8cfloc$r873@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38eb0797@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,a29207fe6ff3368f
X-Google-Attributes: gidfcd2b,public
From: "Harold Howe (TeamB)" <hhowe@bcbdev.com>
Subject: Re: select SOMETHING from AnotherQuery
Date: 2000/04/05
Message-ID: <8cfloc$r873@bornews.borland.com>
X-Deja-AN: 607109590
References: <38eb0797@dnews>
Organization: Another Netscape Collabra Server User
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Newsgroups: borland.public.cppbuilder.database.multi-tier