I think the only way to do such thing - is to create a view for the
inner query. But I am noyt sure it is possible for that query

On 1/24/08, Steeve Gilbert <[EMAIL PROTECTED]> wrote:
> One thing for sure si that you cannot do "embedded" (forgot the real
> term) sql statement.  I'm talking about the sql statement between
> parenthesis.  Make a view with that statement and use the view
> instead.  The rest should be ok.
>
> Steeve...
>
> --- In [email protected], "jquinteroz"
> <[EMAIL PROTECTED]> wrote:
> >
> > Hi!:
> >
> > I have the following SQL statement:
> >
> > select f.itemRelation, f.inventDimId, avg(f.Amount) from
> > (select itemRelation, inventDimId, accountRelation, max(toDate)as
> > maxdate from PriceDiscTable
> > group by itemRelation, inventDimid, accountRelation)
> > as x
> > inner join PriceDiscTable as f
> > on f.itemRelation = x.itemRelation
> > and f.inventDimid = x.inventDimId
> > and f.accountRelation = x.accountRelation
> > and f.toDate = x.maxdate
> > group by f.itemRelation, f.inventDimId
> > order by f.itemRelation
> >
> > How I can translate this code to X++?.
> >
> > Regards.
> >
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>


-- 
Max Belugin, http://belugin.info , ICQ:9406811, MSN: [EMAIL PROTECTED]

Reply via email to