Hi:

I know the question is asking for hsql, but ANSI standard SQL can also
be applied as far as possible.
In standard SQL, if you use  a computed expression, you can simply say
order by <ordinal> where <ordinal> is the number  of the item in the
SELECT list, as in:
select  distinct
         floor(Article.Price / ProductGroup.PriceRange)  *
ProductGroup.PriceRange as 'From', Article.Description AS desc
  from  Article inner join ProductGroup
     on Article.ProductGroupID = ProductGroup.ProductGroupID
where   ProductGroup.Businesskey = :key
order by 1 [desc]  [, 2]

What are your opinions?
 Thanks.



On Dec 29 2008, 9:12 am, "Jan Limpens" <[email protected]> wrote:
> 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

--~--~---------~--~----~------------~-------~--~----~
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