quote from dmc:
----------------------------------------------------------------------
The Tables I am using are in Oracle Human Resources Appications. The hr_all_positions_f table has an budgeted salary amount stored in the Attribute4 field. How do I SUM these values in a report using Oracle report builder? The field is defind as a Varchar2.
Thank You.
----------------------------------------------------------------------
Hopefully, the descriptive flexfield is set up to contain only NUMBERs. If that's the case, then you should be able to saySELECT haou.name organization_name
, SUM(TO_NUMBER(hapf.attribute4)) budgeted_salary
FROM hr.hr_all_positions_f hapf
, hr.hr_all_organization_units haou
WHERE hapf.organization_id = haou.organization_id
AND TRUNC(SYSDATE) BETWEEN haou.date_from
AND NVL(haou.date_to
, TO_DATE('47121231'
, 'YYYYMMDD'))
GROUP BY haou.name
ORDER BY haou.name
Good luck,
Art