Thread View: borland.public.cppbuilder.database.multi-tier
4 messages
4 total messages
Started by Paolo Polce
Wed, 05 Apr 2000 00:00
select SOMETHING from AnotherQuery
Author: Paolo Polce
Date: Wed, 05 Apr 2000 00:00
Date: Wed, 05 Apr 2000 00:00
13 lines
884 bytes
884 bytes
Hello, 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... I'd like to issue a command like "select * from MyPreviousQuery order by something..." Can someone help me? Thank you.
Re: select SOMETHING from AnotherQuery
Author: Harold Howe (TeamB)
Date: Wed, 05 Apr 2000 00:00
Date: Wed, 05 Apr 2000 00:00
19 lines
1254 bytes
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
Re: select SOMETHING from AnotherQuery
Author: Paolo Polce
Date: Wed, 05 Apr 2000 00:00
Date: Wed, 05 Apr 2000 00:00
7 lines
846 bytes
846 bytes
> 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. Perfect, thank you :-)
Re: select SOMETHING from AnotherQuery
Author: Harold Howe (TeamB)
Date: Wed, 05 Apr 2000 00:00
Date: Wed, 05 Apr 2000 00:00
21 lines
1246 bytes
1246 bytes
Paolo Polce wrote in message <38eb5d2d@dnews>... >> 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. > >Perfect, thank you :-) For more info on how to use a clientdataset to sort records, see the article at http://www.cbuilderzine.com/features/1999/10/cb199910hhnew_f/cb199910hhnew_f .asp The article itself is dull and boring, but it does show how to use index'es to sort the data however you want on the client side. Harold Howe [TeamB] http://www.bcbdev.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads