Database Handicapping Software- JCapper

JCapper Message Board

          JCapper 101
                      -- RGN

Home Register
Log In
By RGN
parshooter
1/4/2010
3:46:12 PM
I recall a post earlier about RGN (random generated number). Can it be used in SQL and/or PL UDM's?
I tried using in a SQL UDM and when doing UDM wizard it gave a error message. I just used RGN. Is there a code missing? Please advise.

Reply
jeff
1/5/2010
1:31:30 PM
RGN is a randomly generated number (integer) between 1 and 100 assigned to every starter in the StarterHistory Table. The random number is assigned during SQL Mode database builds, or alternatively, during StarterHistory Table Data Window Exports.

I find RGN useful for segmenting data samples.

Example, during R&D into an idea for UDM creation, I'll add something like the following to a SQL Expression in the Data Window:

AND RGN <= 35

When I run the full SQL Expression through the Data Window, my development sample for the idea I am working on becomes those starters in the table with RGN between 1 and 35.

Once I am happy with the idea that I am working on, I can validate that idea by confronting it with fresh data not used during my initial R&D by simply changing the SQL Expression to:

AND RGN > 35

Now when I run the SQL Expression through the Data Window I am seeing results for a new set of starters... those starters in the table where RGN is between 36 and 100.

If I am seeing acceptable results with the new sample then the idea I was working on can be said to have been "validated."

If I am seeing poor results with the new sample then the idea I was working might have been "backfitted."


RGN is a field in the StarterHistory table... which is used for database builds.

There is no field for RGN in the StartersToday table... which means you can't store a SQL Expression referencing RGN as a factor in a UDM... which is another way of saying that RGN as a factor is Data Window only.


-jp

.

Reply
GlennF
1/5/2010
9:12:20 PM
Jeff-

According to you explanation there should be no entry with a random number of zero yet when I run

select * from starterhistory where RGN=0 on my database I get 112873 plays.

if I run select from starterhistory where RGN> 0 I get 31789 plays.

What's going on?

Reply
jeff
1/5/2010
10:31:59 PM
There are two ways to populate the StarterHistory Table:

a. StarterHistory Table Data Window Export

b. SQL Mode Build Database routines

If I remember right, there was a time when RGN was being generated as a random number between 1 and Field Size and only during StarterHistory Table Data Window Export routines... but not SQL Mode Build Database routines which at the time would have produced a default value of RGN = 0.

Somewhere along the line (I think at Ryesteve's suggestion) I changed RGN so that it was no longer tied to field size and instead made it between 1 and 100. In that same program version (or one soon thereafter) I added functionality so that RGN was added to the table during SQL Mode Database Builds.

My first best guess as to how you came to have 110k records where RGN = 0 and 31k records where RGN has a value would be that most of the records in your table were populated using an early SQL Mode program version that was not yet generating RGN... and at some point you installed a subsequent program version that began populating RGN with a value other than 0.

If you want ALL of the records in your table to have RGN values and you have been creating playlist files during your database builds:

1. Make a backup of your c:\JCapper\Exe\JCapper2.mdb file (just in case)

2. Run a series of StarterHistory Table Data Window Export routines... where the first one is a Clear First... and subsequent routines are done as Appends... with a Compact and Repair Database Routine done in between each export.

This will have the effect of clearing all records from the StarterHistory Table and repopulating it... giving you full RGN values.

If you haven't been generating playlist files with your database builds and you want RGN values in your StarterHistory Table your only option would be to rebuild all databases from scratch.

Hope I explained that in a way that makes sense.


-jp

.



~Edited by: jeff  on:  1/5/2010  at:  10:31:59 PM~

Reply
Reply

Copyright © 2018 JCapper Software              back to the JCapper Message Board              www.JCapper.com