>Hi Tore,
>
>Thanks for the info. I actually just add the COMNAM_08 as GROUP BY. I am not sure what EB means. Please explain. Thanks!
>
>I have this now and I am getting the right data.
>
>
>SELECT VENID_55, COMNAM_08, SUM(ORDCST_55*TNXQTY_55) AS POCOST, ;
> SUM(COST_55*TNXQTY_55) AS STDCOST ;
>FROM VRSUMINV1 ;
>GROUP BY 1,2 ;
>ORDER BY 4 DESC ;
>INTO CURSOR VRSUMINV2
>
>
>Best Regards,
>Sam
'EB' means SET ENGINEBEHAVIOR command
Edward Pikman
Independent Consultant