dbTalk Databases Forums  

How do I NTH select in Paradox?

comp.databases.paradox comp.databases.paradox


Discuss How do I NTH select in Paradox? in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #51  
Old   
Liz McGuire
 
Posts: n/a

Default Re: How do I NTH select in Paradox? - 02-15-2006 , 04:18 PM






Michael Kennedy wrote:
Quote:
Very briefly, the electrical "noise" approach could be compared with the
"hiss" from speakers, when there's no input sound, and the volume is turned
up high. If you look at the signal on a 'scope, it'll vary between some
limits, but, within these limits, it'll be, er, random... I reckon there's
no scientific mechanism which will take all the factors you mentioned into
account, and tell us that, at time T, the hiss will be at level L.
Ah, but don't you wanna give it a try? <g>

Liz

PS: Thanks for the link - if only I had more time, or money, or
something - I too could be famous <g>


Reply With Quote
  #52  
Old   
Jean Friedberg
 
Posts: n/a

Default Re: How do I NTH select in Paradox? - 02-15-2006 , 08:35 PM






Liz,

'pears to me you got yourself locked into one of those male, hairy-chest
pounding discussions. :-)

I got tired of it about halfway through the thread. Seems to me, Paradox's
built-in random function gets the job done as long as you avoid any obvious
biases.

Of course, if one is really concerned about the lawyers -- or just drumming
up a possible consulting contract -- then by all means let's bring in the
"experts".

OK, back to the Olympics and Sirius PureJazz. (I don't "listen" to
television anymore. If I need words, I turn on closed caption.)

All the Best,
Jean

PS Liz, I'm still open to having Paradox Day at my house, on the sole
condition that you attend. Larry, did you hear that?



Reply With Quote
  #53  
Old   
Larry DiGiovanni
 
Posts: n/a

Default Re: How do I NTH select in Paradox? - 02-16-2006 , 08:42 AM



Jean Friedberg wrote:

Quote:
PS Liz, I'm still open to having Paradox Day at my house, on
the sole condition that you attend. Larry, did you hear that?
I'll go if Liz goes.

I'll bring the coffee this time. <g>

--
Larry DiGiovanni
Digico, Inc.
IT Consulting and Staffing Solutions
www.digicoinc.com
Check out www.thedbcommunity.com for Paradox resources.




Reply With Quote
  #54  
Old   
Ed Covney
 
Posts: n/a

Default Re: How do I NTH select in Paradox? - 02-16-2006 , 01:35 PM



Quote:
Do you have any written code that does ramdom
selection for large tables(3 million recs)? If you do, would post it?
ja,

A "single shuffle" random is pretty easy to do with the
assistance of a keyed paradox table.

I've use this routine for many years but for at most 200 or
so records.

First create a paradox table with 2 keyed longint fields.
See 1) Below.

The routine first checks how many records (J) are in your
source table, then creates that many records in QSort.DB
with the 2nd field filled with the numbers 1 - J.

Note(1) - In the shuffle loop, only J-1 items are randomized.
The Jth item is the last card in the deck so to speak.

Note(2) - If it's too slow to randomize 3M records, use a
small (K) : i.e. k = j / 25 and go through the loop (k) times.
The table's last K# of records will be the one "randomized".

Note(3) - Computer rand() functions aren't very good but
the same routine given below could be used iteratively to
shuffle the deck N # of times (requires N+1 keyed fields)
which is out of the question for 3M records.

To see what happens, use much smaller J and/or K for tests.
i.e. First let J = 100 first and watch what happens in QSort.DB
And then set K = 10 and re-inspect the QSort.DB table (only
the last K recs are random).

Lastly, I highly recommend doing a run J = 300,000 and/or
K = 12,000 run to get feel for how fast/slow the routines are
before committing to 3million entries. If that takes too long,
you may want to consider creating QSort.DB in Delphi or
other external means.

Ed


--------------------------------------------
1)
QSort.DB has 2 keyed fields:
* RandOrd (LongInt)
* TblRNum (LongInt)

--------------------------------------------
var
tcS, tcQ tcursor
i,j,k,R,
RMin,RMax LongInt
endvar

tcS.open("YourOrigTableNameHere.DB")
j = tcS.nRecords()
tcS.close()

tcQ.open("QSort.DB")
tcQ.empty()
tcQ.edit()
for i from 1 to j
tcQ.InsertAfterRecord()
tcQ.(2) = i ; It's a tiny bit faster than
endfor ; tcQ."TblRNum" = i
tcQ.postrecord()
sleep(0)

k = j-1 ; **
for i from 1 to k ; **
RMin = 1
RMax = k+1
R = SmallInt (rand()*(RMax-RMin+1)+RMin)
tcQ.movetoRecord(R)
tcQ.(1) = i
endfor
tcQ.endedit()
tcQ.close()






Reply With Quote
  #55  
Old   
Liz McGuire
 
Posts: n/a

Default Re: How do I NTH select in Paradox? - 02-16-2006 , 01:56 PM



It will take approximately 117% of my time just to meet Oracle
deadlines at the end of this month. That doesn't inlcude the 33% of
my time it takes to do "regular" tasks, nor the other requests for the
legacy and replacement systems I'm *supposed* to be working on.

It's not likely to happen.

Sorry.

In theory, once the replacement system is in place (theoretically by
the end of the year) (i.e. once Paradox is gone), I can actually take
a vacation and forget to bring my cell phone. Maybe next year.

Liz


Larry DiGiovanni wrote:
Quote:
Jean Friedberg wrote:

PS Liz, I'm still open to having Paradox Day at my house, on
the sole condition that you attend. Larry, did you hear that?

I'll go if Liz goes.

I'll bring the coffee this time. <g

--
Larry DiGiovanni
Digico, Inc.
IT Consulting and Staffing Solutions
www.digicoinc.com
Check out www.thedbcommunity.com for Paradox resources.

Reply With Quote
  #56  
Old   
Liz McGuire
 
Posts: n/a

Default Re: How do I NTH select in Paradox? - 02-16-2006 , 01:58 PM



Jean Friedberg wrote:
Quote:
'pears to me you got yourself locked into one of those male, hairy-chest
pounding discussions. :-)
In all fairness, I started it. I was curious about what the legal
system considered acceptable. I'm mostly OK with it and my curiosity
is satisfied. I'm totally not-OK with anything that assumes
corruption can't happen. Everything on this planet is corrupting as
we speak, in one way or another.

Quote:
PS Liz, I'm still open to having Paradox Day at my house, on the sole
condition that you attend. Larry, did you hear that?
Please see reply to Larry. :-(

Liz


Reply With Quote
  #57  
Old   
Jean Friedberg
 
Posts: n/a

Default Re: How do I NTH select in Paradox? - 02-16-2006 , 04:50 PM



Isn't Paradox Day March 20?



Reply With Quote
  #58  
Old   
Jean Friedberg
 
Posts: n/a

Default Re: How do I NTH select in Paradox? - 02-16-2006 , 08:26 PM




"Liz McGuire" <liz (AT) paradoxcommunity (DOT) com> wrote

Quote:
It will take approximately 117% of my time just to meet Oracle
deadlines at the end of this month.
If you were doing it in Paradox, would those deadlines have you sweating?

Jean




Reply With Quote
  #59  
Old   
Liz McGuire
 
Posts: n/a

Default Re: How do I NTH select in Paradox? - 02-16-2006 , 08:59 PM



Yes, right around the time UAT will be ending and the final data
extracts will begin (EOM is for testing of the extracts and resolving
issues). And that's strictly for the Oracle project, there are
various other major projects going on (my boss seems to think it all
has to happen at once).

Liz


Jean Friedberg wrote:
Quote:
Isn't Paradox Day March 20?

Reply With Quote
  #60  
Old   
Liz McGuire
 
Posts: n/a

Default Re: How do I NTH select in Paradox? - 02-16-2006 , 09:02 PM



If it was going to take 117% of my time to finish, yes. If my
involvement was because others couldn't get the job done, so they had
to call me in to pick up the slack, yes. If I was also getting
pressure to modify the legacy system when I was supposed to be working
on its replacement, yes. If, yet again, management showed no evidence
of self control or planning before going in with both feet, yes.

You get the idea.

Liz


Jean Friedberg wrote:
Quote:
If you were doing it in Paradox, would those deadlines have you sweating?

Jean

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.