I am trying to join two tables using LINQ and F # using a larger statement. This question is essentially the same as the query here , but using F # instead of C #.
In my case, I have two tables in the SQL Server database: intervals and dates , both of which have the start_time and end_time fields .
I need to perform the non-equivalence of these two tables by matching the start and end times of each table. I tried to do it as follows:
let dc = new TypedDataContext()
let qry =
query {
for i in dc.intervals do
join t in dc.timelines on
(t.start_time > i.start_time && t.start_time < i.end_time)
select (i, t)
}
But this predictably fails with the error:
Invalid join relation in 'join'. Expected expression expr, where is =, =?,? = or? = ?.