dbo.fn_HorseProperty

Syntax:
dbo.fn_HorseProperty(id_horse, property)

Output:
(decimal) Returns properties of an horse.

Input parameters:
id_horse (integer)Id of the runner
property (string)Can return one of the following properties:
  • 'flag' = if 0 the horse has no flag, if 1 the horse has a red flag, if 2 the horse has a black flag
  • 'birth_year' = the birth year of the horse in the format yyyy
  • 'id_trainer' = Id of the trainer.
  • 'id_owner' = Id of the owner.
  • 'days_since_last_run' = Number of days elapsed from the last run
  • 'official_rating' = official rating

Example:

<bet index="2" bid_type="l">
<place condition="dbo.fn_horseproperty(@id_horse,'days_since_last_run') < 90)"
size="2"
price="@best_back_price"
close_trade="y" />
</bet>

Bet all the horses that have run less than 90 days ago.