|
Post by hutchie91 on Jan 2, 2021 2:55:14 GMT
Hi there,
I think I've managed to do this before in an earlier version, but can't seem to manage it at the moment.
I'm using dbo.fn_GetPrice(@id_race, @id_favourite_[n], 'b',1) to get the best price for the top three runners as part of a dutching strategy, but this obviously only works for the top 3.
What I want to be able to do is use dbo.fn_GetPrice(@id_race, @position_1=[n], 'b',1), but that returns a syntax error.
Basically, I can't work out how to get the id of a horse outside of the top 3 using the existing functions and variables, and I think I have been able to before, and it's doing my head in. Is there a way to get these ids, or is there a way to extend the favourites variable beyond 3?
TIA
|
|
|
Post by Ipposnif on Jan 2, 2021 16:52:13 GMT
Yes you can do using two nested functions:
dbo.fn_GetPrice(@id_race, dbo.fn_RaceProperty (@id_race, 'favourite_by_odd', 4), 'b', 1)
replace 4 with the position of the horse for whom you want to get the price.
|
|
|
Post by hutchie91 on Jan 4, 2021 3:55:15 GMT
Perfect, thanks for that. favourite_by_odd was the variable I was missing
|
|