|| How to..Building connections UDM
|Knowing that there is a limit to the number of UDM's that can be created, how would I go about creating a single UDM that consisted of multiple trainers with multiple jockeys with the intent of the UDM showing each trainer's main rider or riders?|
Secondly, and somewhat similar, how would one create a negative expectation UDM showing weak riders and trainers with a particular owner? As always thanks in advance to the gurus :) Scott
|You want to use something called The Name Selection Tool.|
Here's a link to another thread where you can find answers to questions that are highly similar to those that you asked:
Hint: You'll need to be logged into the board in order to view content in the private area of the board that deals with the Name Selection Tool itself.
~Edited by: jeff on: 9/12/2012 at: 5:23:22 PM~
|I should have been more specific in my inquiry. My problem is more with sql expression than garnering the stats required to get there. So lets run one at MNR on one of the most heavily bet jocks in the country other than Russel Baze lol. How would I write a sql expression that would include the owner Emerald Spring Stable and Deshawn Parker and for that matter Jorge Bracho a combined 2/34? And if I used this as a single negative expectation UDM, how would I add additional owner/jockey combos as I encounter them in my research in the same UDM?|
~Edited by: GUGA on: 9/12/2012 at: 6:49:19 PM~
|Q. How would I write a sql expression that would include the owner Emerald Spring Stable and Deshawn Parker and for that matter Jorge Bracho a combined 2/34? |
Enhanced Settings Module Screenshot - click here -
The first thing you need to know when working with CXN names is that you need an exact match in your sql expressions for every name you are working with. This is made exponentially easier by removing punctuation characters from the names before getting started. If you are an HDW data subscriber you have the ability to control formatting for the CXN names inserted into your .JCP files. The first thing I would do is persist the CXN Names Formatting setting in the Enhanced Settings Module to strip punctuation characters from CXN names. This will cause the CXN names inserted into your .JCP files to not have punctuation characters that can get in the way of your sql expressions.
Hint: Merely persisting the setting to "strip punctuation characters" does not change data sitting in previously built .JCP files and/or previously built pl_profile.txt files and/or previously built quick index files and/or previously built starterhistory tables. After persisting the setting to "strip punctuation characters" you have to: 1. Rebuild .jcp files and 2. Rebuild databases before all of the CXN names in your previously built files will be formatted with punctuation characters stripped from them.
re: owner Emerald Spring Stable...
This screenshot -click here- shows the JCapper2.mdb file's starterhistory table open in Access with the owner field sorted in alphabetical order. I can see at a glance from the screenshot that there are multiple owner names bearing the characters "Emerald." When working with owner names it is crucial that you understand the following:
1. There are literally tens of thousands of different registered owners.
2. You need to get an exact match for each specific owner name that you are interested in.
3. Partial name matches have the ability to make your UDM flag the horses of a completely different stable than the ownership group you wanted. (Be extremely careful about getting an exact name match.)
Looking at the screenshot, you can see at a glance that the exact name for the owner is Emerald Spring Stables.
Hint: If you don't have Access on your machine you can pick up the exact owner name by copying and pasting the owner name directly from past performancecs rendered by the JCapper Past Performance Generator.
Q. Ok. Now that we know the owner name, how do we use it in a sql expression?
A. The following line works:
AND OWNER = 'EMERALD SPRING STABLE'
Q. How would we add a single rider name to the sql expression?
A. The following line works:
AND RIDER = 'PARKER DESHAWN L'
Q. What if we wanted the UDM to flag horses owned by EMERALD SPRING STABLE that are ridden by multiple riders on a separately compiled rider list?
A. Use the owner name the same way as shown above, but use the INSTR command with a rider list shown as follows:
AND OWNER = 'EMERALD SPRING STABLE'
AND INSTR('PARKER DESHAWN L-BRACHO JORGE G', RIDER) > 0
Key bullet points about the above sql expression:
The owner name is an exact match against the characters stored in the owner field of of the starterhistory table as shown in the above linked to screenshot.
Each of the rider names in the rider list is separated using a dash character.
Each of the rider names in the rider list is an exact match against the characters stored in the rider field of the starterhistory table in the above screenshot.
Q. And if I used this as a single negative expectation UDM, how would I add additional owner/jockey combos as I encounter them in my research in the same UDM?
A. The video for the Name Selection Tool illustrates the process of pasting a formatted list of several hundred CXN names (with each of the names on the list separated by dash characters) into the rider and trainer name fields in the UDM Wizard - which is how you would do it if you were working in playlist file mode. But what if you are working in sql mode? Easy. Use the Name Selection Tool to first get the names into the rider or trainer name field of the UDM Wizard. But instead of saving the names to the UDM definition, highlight the name list sitting in the rider or trainer name field - COPY the highlighted name list to the Windows clipboard using the CTRL-C key combination - and then PASTE the highlighted name list from the Windows clipboard directly into a sql expression using the CTRL-V key combination. No real limit on the number of names here. Ive created sql expressions that involve well over 1000 names using this same exact procedure.
Hope I managed to explain most of that in a way that makes sense,
|So if I wanted to combine all these into one udm it would look something like And ((owner = 'emerald spring stable' and instr('parker deshawn l-'bracho jorge g' , rider) > 0) or (owner = 'Joe C Faulkner' and instr('fox kris-ramos ramon') > 0)) ...... and continue to use the "OR" statement as new combos were discovered?|
|Basically, yes. Multiple OR statements will work. Keep in mind that placement of parenthesis characters is critical.|
Personally, if I were creating this type of UDM - I might approach it by creating a single UDM for each track - and listing out individual OR conditionals for desired owner, rider, trainer, combinations, etc. for a single track within each UDM.
|Sage advice as always. Thanks Jeff.|