Koushik Paul
2018-07-27 12:42:56 UTC
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 ?
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 ?
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.
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.