[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Use of Aggregate Functions in SQR ??



Yes, we can use Aggrgate Functions in SQRs.
say like this :

Begin-select
emplid
max(end_balance) &max_end_bal

  let #max_end_balance = &max_end_bal

! do further-rocessing

>From ps_pa_accums
Where  functn_result_nm = 'aaaaaa_b'
Group by emplid

end-select

! And u can use #max_end_balance for further processing

Hope this helps,
Manoj

>Can SQL aggregate functions be used in SQR ? I would like to be able to get
>the same functionality as the following SQL Statement.
>
>Select  emplid,  max(end_balance)
>   From ps_pa_accums
>    Where  functn_result_nm = 'aaaaaa_b'
>     Group by emplid
>
>Thanks,
>
>Marge

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com