tags:

views:

20

answers:

2

I am having difficulties getting a subset of results From a huge set of results and then performing a join on this particular subset.. can anyone help regarding this??

More specifically,

Say I have an student Table which contains 1000 rows of student and department table which has the list of departments. What I want to do is to get a subset of rows say from 510 to 520 and then perform a join on these rows with the department table..

can anyone help me regarding this???

A: 

I want to add that i want the query in nhibernate

abhijeet
+1  A: 

You can do it using one and only query:

Once you have your criteria object, do this:

criteria.SetFirstResult(510).SetMaxResult(10);
Pierre 303
thanx it worked !!
abhijeet