very cool, thanks!

On Mon, Dec 29, 2008 at 12:50 PM, Fabio Maulo <[email protected]> wrote:

> select distinct cast( floor(a.Price/pg.PriceRange)*pg.PriceRange as
> Double) from Article a
> inner join a.ProductGroup pg
> where pg.BusinessKey = :key
> order by  cast( floor(a.Price/pg.PriceRange)*pg.PriceRange) as Double)
>
> With the actual HQL-queryTranslator math operation are allowed only inside
> a function and the best candidate function to ensure the result type is the
> cast fuction.
>
> 2008/12/29 Jan Limpens <[email protected]>
>
> I have this sql query:
>>
>> select  distinct
>>         floor(Article.Price / ProductGroup.PriceRange)
>>         * ProductGroup.PriceRange as 'From'
>> from    Article
>>         inner join ProductGroup on Article.ProductGroupID =
>> ProductGroup.ProductGroupID
>> where   ProductGroup.Businesskey = :key
>> order by 'From'
>>
>> is there a way to express this in hql?
>>
>> --
>> Jan
>>
>>
>>
>
>
> --
> Fabio Maulo
>
> >
>


-- 
Jan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to