how to get records from subquery using union in linq

Posted by varun on Stack Overflow See other posts from Stack Overflow or by varun
Published on 2010-03-13T09:02:47Z Indexed on 2010/03/13 9:05 UTC
Read the original article Hit count: 403

Filed under:
|

sql = " SELECT * FROM userDetail "; sql += " WHERE userId IN "; sql += " (SELECT friendId FROM userFriends "; sql += " WHERE approvalStatus='True' AND userId=" + userId; sql += " UNION"; sql += " SELECT userId FROM userFriends "; sql += " WHERE approvalStatus='True' AND friendId=" + userId + ")";

© Stack Overflow or respective owner

Related posts about using

Related posts about LINQ