There was only one column in the IN clause, when I have to match with 
multiple column, in SQL I use join with ON clause " ON a.x=b.x and a.y=b.y)

Is it possible in HQL also ?

On Monday, November 24, 2008 at 9:56:02 AM UTC+5:30, marducci wrote:
>
> Can someone please help me turn the following sql statement into an 
> nhibernate HQL query? 
>
> select * from mmt_storage_product m inner join 
> (select storage_ID, max(asofdatetime) as asofdatetime from 
> mmt_storage_product s group by storage_ID ) s 
> on  m.asofdatetime = s.asofdatetime 
>
> This is my attempt so far:  The naming is a bit different for my HQL 
> because of changes in class names and paramters. 
>
> session.CreateQuery("from StorageProduct m inner join (select 
> storageID, max(asOfDateTime) as asOfDateTime from StorageProduct s) on 
> m.asOfDateTime = s.asOfDateTime") 
> .List<BLL.Storage.StorageProduct>(); 
>
> Thanks so much. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nhusers+unsubscr...@googlegroups.com.
To post to this group, send email to nhusers@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to