Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 6 of 6 total |
Selecting a random number of records |
Wed, Aug 29 2007 3:18 PM | Permanent Link |
Allan Brocklehurst | Hello;
Is there a way to select a random number of records from a table? TIS Allan |
Wed, Aug 29 2007 4:55 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Allan,
<< Is there a way to select a random number of records from a table? >> Sure, just set the TDBISAMQuery MaxRowCount property to a Random() value prior to running the query. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Aug 30 2007 11:27 AM | Permanent Link |
Allan Brocklehurst | Tim; YOu answered my question. But it seems I didn't ask the right question Here goes again Can I get a set of, say 100, records selected ramdomly out of a table? Allan "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: Allan, << Is there a way to select a random number of records from a table? >> Sure, just set the TDBISAMQuery MaxRowCount property to a Random() value prior to running the query. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Aug 30 2007 12:12 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Allan
If you have an integer field to select on you could create a list of random numbers and then do an IN Roy Lambert |
Thu, Aug 30 2007 1:55 PM | Permanent Link |
"Donat Hebert \(Worldsoft\)" | I think you're looking for something using rand function. You may want to
set a range according to size of your sample but may not be required. This this logic a whirl. hth Donat. Select RecIdent, Rand() as RandNum Into ATemp from BgTranyr; Select * from ATemp Order by RandNum top 100 ; "Allan Brocklehurst" <brock@ns.sympatico.ca> wrote in message news:E2562D93-8F85-46EF-A3A7-655E211DFF61@news.elevatesoft.com... > Hello; > Is there a way to select a random number of records from a table? > > TIS > > Allan > |
Fri, Aug 31 2007 7:45 AM | Permanent Link |
Allan Brocklehurst | Thanks al of you guys for this. These will work Allan "Donat Hebert \(Worldsoft\)" <donat.hebert@worldsoft.ca> wrote: I think you're looking for something using rand function. You may want to set a range according to size of your sample but may not be required. This this logic a whirl. hth Donat. Select RecIdent, Rand() as RandNum Into ATemp from BgTranyr; Select * from ATemp Order by RandNum top 100 ; "Allan Brocklehurst" <brock@ns.sympatico.ca> wrote in message news:E2562D93-8F85-46EF-A3A7-655E211DFF61@news.elevatesoft.com... > Hello; > Is there a way to select a random number of records from a table? > > TIS > > Allan > |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |