-
NHibernate: Mapping a join on a joined table As Sub-Query
I want to map 4 tables in a single mapping file as a Subquery. Below is my requirement query.
Query:
SELECT CU.*
FROM TABLE1 PU
INNER JOIN TABLE2 CU ON CU.USERID = PU.USERID
WHERE CU.CATALOGID IN
(
SELECT CA.CATALOGID
FROM TABLE1 P
INNER JOIN TABLE3 UG2 WITH (NOLOCK) ON UG2.USERID = P.USERID
INNER JOIN TABLE4 CA WITH (NOLOCK) ON CA.ITEMID=UG2.GROUPID AND CA.DELFLAG=0
)
Any one pls help on this?
-
Recommend you direct this question to the NHUSERS forum at http://groups.google.com/group/NHUSERS since its not SPRNET-related.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules