select * from tab where field in ("val1", "val2");
Posted: Wed 23 Mar 2016 12:16
Hi,
how can I write the query in LINQ?
I can do something like
But I need something like this (it dosn't work and has a run time error with wrong sytax!)
BUT the following code works! But it retruns no data!
This code works and it returns data!
Could you help me?
Thx!
how can I write the query in LINQ?
I can do something like
Code: Select all
Query := Linq.From(FEntityContext['TAB'])
.Where(
(FEntityContext['TAB']['field'] = 'val1')
or
(FEntityContext['TAB']['field'] = 'val2'))
.Select();
Code: Select all
Query := Linq.From(FEntityContext['TAB'])
.Where('TAB.field in (''val1'',''val2'')')
.Select();
Code: Select all
Query := Linq.From(FEntityContext['TAB'])
.Where('TAB.field in ("val1'')')
.Select();
Code: Select all
Query := Linq.From(FEntityContext['TAB'])
.Where('TAB.field = ''val1''')
.Select();
Thx!