Discussion:
[nhusers] Linq to Sql in criteria with multiple 2 dimensional variables
Gökhan Abatay
2018-11-29 19:26:53 UTC
Permalink
Hi,
How can I write linq to sql in criteria with multiple 2 dimensional
variables.

As output sql need to be;

SELECT * FROM TABLE WHERE (COLUMN_1,COLUMN_2) IN ((x,Y),(Z,k),(M,L))
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Ricardo Peres
2018-11-30 09:32:36 UTC
Permalink
This is not supported in any SQL-compliant server that I know. See, for
example, for SQL Server, this SO
answer: https://stackoverflow.com/questions/35194028/in-clause-in-sql-server-with-multiple-columns/47301855.
Where do you want to run it?

RP
Post by Gökhan Abatay
Hi,
How can I write linq to sql in criteria with multiple 2 dimensional
variables.
As output sql need to be;
SELECT * FROM TABLE WHERE (COLUMN_1,COLUMN_2) IN ((x,Y),(Z,k),(M,L))
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Gökhan Abatay
2018-11-30 10:36:45 UTC
Permalink
I am using Oracle database and it' supported.

If NH can translate linq or hql below this format or support dialect level
differences about multiple in clause that would be awesome.

SELECT * FROM TABLE WHERE ((COLUMN_1 = x and COLUMN_2 = Y) or (COLUMN_1 =
Z and COLUMN_2 = k))
Post by Ricardo Peres
This is not supported in any SQL-compliant server that I know. See, for
https://stackoverflow.com/questions/35194028/in-clause-in-sql-server-with-multiple-columns/47301855
.
Where do you want to run it?
RP
Post by Gökhan Abatay
Hi,
How can I write linq to sql in criteria with multiple 2 dimensional
variables.
As output sql need to be;
SELECT * FROM TABLE WHERE (COLUMN_1,COLUMN_2) IN ((x,Y),(Z,k),(M,L))
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Loading...