Hello all,
I am using crystal xi and oracle 9.
I got a sql like following :
select r.PRIM_TIMBER_TYPE ptt,
tt.TIMBER_TEXT ptx,
count(r.RECON_ID),
sum(r.ACRES_AMT) Acres,
TO_CHAR(sum(r.ACRES_AMT)/TO_NUMBER
P53_RECON_ACRES,'999999999')*100,'990.99') P,
TO_CHAR(sum(r.ACRES_AMT)/TO_NUMBER
P53_FORESTED_ACRES,'999999999')*100,'990.99') P2
from fr_recon r, fr_timber_type tt
where r.FR_PROP_CODE =
0_PROPERTY
and
r.PRIM_TIMBER_TYPE = tt.TIMBER_TYPE
and
tt.FOREST_FLAG = 'F'
group by r.PRIM_TIMBER_TYPE, tt.TIMBER_TEXT
note:
sql for :
53_RECON_ACRES
(select sum(r.ACRES_AMT)
from fr_recon r
where r.FR_PROP_CODE =
0_PROPERTY)
sql for:
53_FORESTED_ACRES
(select sum(r.ACRES_AMT)
FROM fr_recon r, fr_timber_type tt
where r.PRIM_TIMBER_TYPE = tt.TIMBER_TYPE
and tt.FOREST_FLAG = 'F'
and r.FR_PROP_CODE =
0_PROPERTY
and nvl(instr(r.STAND_PREFIX_CODE,'R'),0) = 0
and nvl(instr(r.STAND_PREFIX_CODE,'Y'),0) = 0
and nvl(instr(r.STAND_PREFIX_CODE,'Z'),0) = 0)
sum(r.acres_amt) this is the total amount for all prop_codes.
actually i can able to get the below fields on report.
r.PRIM_TIMBER_TYPE ptt,
tt.TIMBER_TEXT ptx,
count(r.RECON_ID),
sum(r.ACRES_AMT) Acres,
for last 2 fields i confused.
anybody can tell how can i get last 2 fields on report.
I am using crystal xi and oracle 9.
I got a sql like following :
select r.PRIM_TIMBER_TYPE ptt,
tt.TIMBER_TEXT ptx,
count(r.RECON_ID),
sum(r.ACRES_AMT) Acres,
TO_CHAR(sum(r.ACRES_AMT)/TO_NUMBER
TO_CHAR(sum(r.ACRES_AMT)/TO_NUMBER
from fr_recon r, fr_timber_type tt
where r.FR_PROP_CODE =
and
r.PRIM_TIMBER_TYPE = tt.TIMBER_TYPE
and
tt.FOREST_FLAG = 'F'
group by r.PRIM_TIMBER_TYPE, tt.TIMBER_TEXT
note:
sql for :
(select sum(r.ACRES_AMT)
from fr_recon r
where r.FR_PROP_CODE =
sql for:
(select sum(r.ACRES_AMT)
FROM fr_recon r, fr_timber_type tt
where r.PRIM_TIMBER_TYPE = tt.TIMBER_TYPE
and tt.FOREST_FLAG = 'F'
and r.FR_PROP_CODE =
and nvl(instr(r.STAND_PREFIX_CODE,'R'),0) = 0
and nvl(instr(r.STAND_PREFIX_CODE,'Y'),0) = 0
and nvl(instr(r.STAND_PREFIX_CODE,'Z'),0) = 0)
sum(r.acres_amt) this is the total amount for all prop_codes.
actually i can able to get the below fields on report.
r.PRIM_TIMBER_TYPE ptt,
tt.TIMBER_TEXT ptx,
count(r.RECON_ID),
sum(r.ACRES_AMT) Acres,
for last 2 fields i confused.
anybody can tell how can i get last 2 fields on report.