>Hi Ed,
>
>
>Select vendorid,vendorname,cnt() as vendorcnt,sum(qtyrecv) as qtyrecv, ;
>sum(qtyrej) as qtyrej,round(100*sum(qtyrej)/sum(qtyrecv),2) as perrej ;
>from rejects group by 1
>
>
>Thanks for the code again. Where do I need to put this? Do I need to take out Cetin's 1st version of code and put the code that you gave me or just the code before scan? Please advice.
>
>Thanks,
>Sam
It does everything without SCAN. Try it and you will get results right away. Just one small typo: it should be CNT(*) instead of CNT()
Edward Pikman
Independent Consultant