Sql Statement in Oracle

RAMMEDJR

Well Known Member
Can someone give me some insight on an sql statement that would look at the
F0902 and compare the total of the 14 periods against the gbborg field and
list any accounts that have a variance.

Thanks.

Dave Rammer
Sheboygan County IS
(920)459-0539

B7331 SP11.2 / HP-UX 11.0 / Oracle 8.0.6
 
Dave,

if you're using SQLPlus the inclde the 2 set statements below - otherwise ignore them.
*****************************************
select pagesize 50;
select linesize 80;

select gbaid as "AccountID", gbco as "Company", gbmcu as "Cost Center", gbobj as "Obj Acct", gbsub as "Sub Acct",
(gban01+gban02+gban03+gban04+gban05+gban06+gban07+gban08+gban09+gban10+gban11+gban12+gban13+gban14)
as "Periods Total", gbborg as "Budget"
from proddta.f0902
where (gban01+gban02+gban03+gban04+gban05+gban06+gban07+gban08+gban09+gban10+gban11+gban12+gban13+gban14)
<> gbborg;
******************************************

Cheers,

Larry Jones
[email protected]
OneWorld B733.1, SP 11.3
HPUX 11, Oracle SE 8.1.6
SandBox: OneWorld XE SP15
 
Back
Top