Monday, June 23, 2008

LINQ for right outer join and not equal

Hi to all,
Today i got struggle for query right outer join and not equal condition. finally i got result by this way. I have hope this will help to you.

var sorder= (from S in qryGen.T_order
select new { S.F_order_Id, S.F_order_Number }).Except
(from P in qryGen.T_Purchases
join G in qryGen.T_order on P.F_order_Id equals G.F_order_Id
select new { P.F_order_Id,G.F_order_Number });


Please post your comments!

Cheers!
Murali

2 comments:

Happy Agarwal said...

Thank u so much....

Anonymous said...

Doi Murali,

This is supper one, It is working for right outer join like not equal in the LInq. really this is good one.
Cheers.
Arul