Database Handicapping Software- JCapper

JCapper Message Board

          JCapper 101
                      -- Change of year Database problem

Home Register
Log In
By Change of year Database problem
msammons
7/2/2012
10:16:27 PM
I started JCapper late last year. I bought and added July 2011 to my database, and have ever since added all races in my 2011 folder. So my SQL searches included all my races from July 2011 to June 2012. No problem as long as the month names did not overlap (July 2011 and July 2012 for example.)

Then when I ran a calculate races for 7-1-2012 it gave results for 7-1-2011. Even though I had only Card Loaded for 7-1-2012 it nevertheless used the 7-1-2011 races. (I assume for some reason the program ignores the year and only loads the first month-day files found - so even though both July 2011 and July 2012 files are in the 2011 folder, and I instructed the July 2012 files be loaded, the program nevertheless loaded the July 2011 races.)

I solved this problem by starting a new 2012 folder without any 2011 races and it calculated the 7-1-2012 races correctly.

My problem now is - and the reason I just kept building on the 2011 folder - I wanted my SQL searches to include all the races I have ever downloaded (2011, 2012, and beyond eventually).

So my question is, how do I include both 2011 and 2012 races in a single database for SQL searches (avoiding the same month - different year overlap problem.)

Any suggestions?



Reply
jeff
7/3/2012
12:19:54 AM
Before diving in and giving out instructions for populating the starterhistory table, it is critically important that individual database folders contain the data and results files of a single year only.

Why? You nailed the answer with your post. The file names themselves have elements for track code, month, and day - but nothing in the filename that identifies the year... This presents many many opportunities for databases to become corrupted (too many for me to want to post about them all here.)

Suffice to say that the data and results files from 2011 should be on a 2011 folder (or split among many 2011 folders.) Likewise, data and results files from 2012 should be on a 2012 folder (or split among many 2012 folders.)

You'll get better mileage operating that way:

A yearly folder structure, one main individual folder for each year with multiple sub folders for splitting the files up within each year - absolutely no mixing of files from different years on any single folder.




Before going any further, I'd recommend manually moving all files from year 2012 onto their own folder (leaving your previous folder designated for the files of 2011 only.)

1. Sort the data and results files on the 2011 folder(s) you've been using.

2. Manually highlight all files from 2012 (by ctrl-clicking them.)

3. Right click the highlighted group and select CUT to get all filenames from the highlighted group onto the Windows Clipboard.

4. Navigate to a desginated folder for 2012.

5. Right click anywhere inside of the designated folder and select PASTE to move all file names on the Windows Clipboard from the first (source) folder to the (target) designated folder.

With that task done, now it's time to talk about getting the starterhistory table populated.

more to come...


-jp

.

Reply
jeff
7/3/2012
12:22:37 AM
If you've already performed db builds on the 2011 and 2012 folders, and you are satisfied that the pl_profile.txt files on each folder contain starters for the correct year, one way to populate the starterhistory table so that it contains starters from both years is through Data Window Export.

Here is a link to an older thread where I posted step by step instructions:
http://www.jcapper.com/messageboard/TopicReader.asp?topic=1044&forum=JCapper%20101

Let me know if that does the trick.

-jp

.

Reply
msammons
7/4/2012
9:39:05 AM
Thank you Jeff.

Everything worked great!

Reply
Reply

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