|
Post by hmesser on May 1, 2022 20:26:39 GMT
Hi, I can see in the tables that the sex of the runners in races is recorded, but was wondering if I can reference this to filter selections?
Hope that makes sense!
Rob
|
|
|
Post by Ipposnif on May 2, 2022 7:49:15 GMT
Hi, actually the variable is missing, but you can add it yourself. From Ipposnif, open Tools -> DB Command and paste the following text:
INSERT [dbo].[tbl_SysVariables] ([Name], [Declaration], [Funct]) VALUES (N'sex', N'declare @sex varchar(max)', N'select @sex=isnull(sex,'''') from [tbl_Horses] where [ID]=@id_horse')
and press EXECUTE.
From now on you can use this variable in the strategy's criteria, for example in the bet Trigger Condition:
@sex='m'
|
|
|
Post by hmesser on May 2, 2022 10:03:25 GMT
Hi, actually the variable is missing, but you can add it yourself. From Ipposnif, open Tools -> DB Command and paste the following text: INSERT [dbo].[tbl_SysVariables] ([Name], [Declaration], [Funct]) VALUES (N'sex', N'declare @sex varchar(max)', N'select @sex=isnull(sex,'''') from [tbl_Horses] where [ID]=@id_horse')
and press EXECUTE. From now on you can use this variable in the strategy's criteria, for example in the bet Trigger Condition: @sex='m' Thanks! So in the runner filter if I wanted to only place bets on fillies or mares would this work as the SQL assertion? (@sex='m' or @sex='f')
|
|
|
Post by Ipposnif on May 2, 2022 12:58:39 GMT
Yes, the SQL syntax is correct. As an alternative you can write also:
@sex IN ('f','m')
I'm not 100% sure about the association between the char and the sex of the horse, Betfair doesn't provide this info. But it should be the following:
c= A male under five years old is called a Colt. h= A male that turns five becomes a Horse. g= A male that is castrated is called a Gelding. f= A female under five years old is called a Filly. m= A female that turns five becomes a Mare.
|
|