Try this:
Code:
Query q = session.createQuery("select c.col3 from table1 a, table2 c" +
" where a.col1 = c.col2 and c.col3 in (select d.col3 from table2 d where d.col2= :value)")";
q.setInteger("value", 51);
List listResult = q.list();
If that doesn't work, you can take the long route...two seperate queries...i.e. doing your inner query first, getting the list from it, and creating a StringBuffer of the elements. But, the above should work.
I added in the ":value", so that you can re-use the query for different col3 values. :)
Try reading through the HQL section of the Hibernate_Reference.pdf file, I go there often.
-G