I have two custom lists.
list 1 having following columns:
ID (consider as PK)
title
list 2 having following columns
NID (lookup column)
title
I'm using spquery.joins like below
<Joins>
<Join Type='INNER' ListAlias='list2'>
<Eq>
<FieldRef Name='ID' RefType='Id' />
<FieldRef List='list2' Name='NID' />
</Eq>
</Join>
</Joins>
I'm defining projected fields as well like below
"<Field Name='NID' Type='Lookup' List='list2' ShowField='NID'/>";
I don't know what is wrong with this but whenever I try I get following exception
Value doesn't fall within the expected range