also tried something like this as  following but compile error is
there , kindly suggest, cant use numbers like "1"

Projections.Sum(Projections.ProjectionList().Add(Projections.Property
("A") * ((Projections.ProjectionList().Add(Projections.Property("B") *
(1 - (Projections.Property("B"))))))))

On Nov 3, 5:37 am, n hibernate user <[email protected]> wrote:
> the querry is to select sum( a*b)  group by  a ( a-1 )  (a,b columns)
> from a temp table which is created from the joins of other tables .
> can u suggest some thing on this ? is it possible using proj / hql ?
> how ?
>
> On Nov 2, 11:23 pm, Fabio Maulo <[email protected]> wrote:
>
>
>
> > it can be done as you can do in SQL.
> > The question is why that function should be solved by RDBMS and not by BL or
> > Domain.
>
> > 2009/11/2 n hibernate user <[email protected]>
>
> > > How can we multiply / divide two columns of a table and take the sum
> > > of all these products using n hibernate ? suppose there r two columns
> > > ( A and B ) which are multiplied column wise and then summed across
> > > all the rows ? how can this be done using projections / h query ??
>
> > --
> > Fabio Maulo- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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