Click here to Skip to main content
15,906,223 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..
how to write this query using linq.

SELECT * FROM TABLE1 WHERE sales in (SELECT Sales FROM TABLE2)
Posted

Hey chk this hope this might help u...

var query1 = (from T2 in Table2
select T2.Sales).Distinct();

var WerQuery = (from T1 in TABLE1
where query1.Contains(T1.Sales)
select new { T1.CO1,T2.Col2,.... }).Distinct();
 
Share this answer
 
Hi,

Linq to Sql[^]

Refer this link, i hope its helpful to you.

Cheers :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900