dbo.fn_RaceHorseProperty

Syntax:
dbo.fn_RaceHorseProperty(id_race, id_horse, property, index)

Output:
(decimal) Returns properties of an horse in a specific race.

Input parameters:
id_race (integer)Id of the market.
id_horse (integer)Id of the runner.
property (string) Can return one of the following properties:
  • 'back_prices' = back price at the [index] position. When [index]=1 returns the best back price in that moment.
  • 'back_sizes' = back size amount at the [index] position
  • 'lay_prices' = lay price at the [index] position
  • 'lay_sizes' = lay size amount at the [index] position
  • 'starting_price' = the last recorded price before the market closed or went in play.
  • 'tam' = total amount matched for that in horse in that race.
  • 'min_matched_price' = the minimum price recorded for that horse before the race closed or went in play
  • 'max_matched_price' = the maximum price recorded for that horse before the race closed or went in play
  • 'number' = the number of the horse
  • 'draw' = the draw number of the horse
  • 'weight' = the weight of the horse. In default it is expressed in pounds. You can switch to kilograms from the options.
index (integer)When the property returns an array (for ex. back_prices), with index you specify the ordinal position of the value you want.
If the property returns one single value (for ex. tam), this parameter is unused.

Example:

dbo.fn_racehorseproperty(@id_race, @id_horse, 'tam', 1)
  /dbo.fn_raceproperty(@id_race, 'tam', 1)

returns the ratio between the total amount matched on a horse and the total amount matched on the race.