Thanks Cetin for your response.
Now comes the real problem. I have to have this value as a View. I am supposed to use this value in Report Manager (similar to Crystal Reports, but free) through ODBC. I can call views in RM. How can I create a view of this so I can call it over there?
Please advise.
>
>if seek(parentID,'child','fktag')
> select child
> lnCol10 = col10
> calculate avg(col13) ;
> while parentID=parent.parentID and col10 = lnCol10 ;
> to lnResult
>endif
>
Cetin