Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i have 1 table with order(numordine) and order items (ccoar)
i need calculate from load script the avg difference from (dtcre and dtctb group by for ccoar) group by for any numordine !
how can I make a group by in another group by in only load statement?
in load script i can't use with aggr function..
Aggr(DISTINCT
AVG(
if (
Aggr(DISTINCT DTCTB,CCOAR,DTCTB)>0 and Aggr(DISTINCT DTCRE,CCOAR,DTCRE)>0
,
Interval(date(date#(Aggr(DISTINCT DTCTB,CCOAR,DTCTB),'YYYYMMDD'),'YYYYMMDD') - date(date#(Aggr(DISTINCT DTCRE,CCOAR,DTCRE),'YYYYMMDD'),'YYYYMMDD'),'d')
)
,NUMORDINE