AnsweredAssumed Answered

Execute SQL where not working

Question asked by fredtsui on May 6, 2018
Latest reply on May 9, 2018 by fmpdude

Hi all

I have:

1 table called Riders, with fields called Rider Names, Horse, and a unique ID called RiderID

1 table called Results, with fields called "Rider", RiderID, Horse

 

In table Riders, I want to have a field that list all of the horses that rider has ridden in the many results.

I tried an Execute SQL

 

ExecuteSQL (

"

SELECT DISTINCT

Results.Round1_Horse

FROM Results

"

; "" ; ""

)

 

But that gives me all horses ridden regardless of rider.

So I add

 

ExecuteSQL (

"

SELECT DISTINCT

Results.Round1_Horse

FROM Results

WHERE Results.RiderID = Riders.RiderID

"

; "" ; ""

)

 

But then all I get is a question mark in the field.

Why is that?

 

Thanks.

Outcomes