|
Posted by MC on 03/23/07 18:22
Something like this=
Select
SCDMASTER.SCTY_CLASS_CODE,
sum(CUSTODY_BALANCE.OPENING_BALANCE +
CUSTODY_BALANCE.DEPOSIT_AMOUNT -CUSTODY_BALANCE.WITHDRAWAL_AMOUNT)
from
PMCAPSHIST.CUSTODY_BALANCE CUSTODY_BALANCE,
CAPSREPORT.SCDMASTER SCDMASTER
where
CUSTODY_BALANCE.ASSET_ID = SCDMASTER.CUSIP_ID AND
((CUSTODY_BALANCE.APPLICATIONCYCLEDATE={ts '2007-03-21 00:00:00'}) AND
(SCDMASTER.SCTY_CLASS_CODE Not In
('BILL','NOTE','BOND','CD','BD','CB','TINT','TPRN','CA','YD')))
group by
SCDMASTER.SCTY_CLASS_CODE
MC
"Andreas" <andreas.strzodka@ny.frb.org> wrote in message
news:1174673610.080198.22590@y66g2000hsf.googlegroups.com...
> Hi,
>
> I am bloody amateure and I was wondering if someone could help me edit
> the statement below so it groups the field SCDMASTER.SCTY_CLASS_CODE
> and creates one field called "total balance" equalling
> CUSTODY_BALANCE.OPENING_BALANCE + CUSTODY_BALANCE.DEPOSIT_AMOUNT -
> CUSTODY_BALANCE.WITHDRAWAL_AMOUNT
>
> SELECT
> CUSTODY_BALANCE.APPLICATIONCYCLEDATE,
> CUSTODY_BALANCE.ASSET_ID,
> SCDMASTER.SCTY_CLASS_CODE,
> CUSTODY_BALANCE.OPENING_BALANCE,
> CUSTODY_BALANCE.DEPOSIT_AMOUNT,
> CUSTODY_BALANCE.WITHDRAWAL_AMOUNT
> FROM
> FPMCAPSHIST.CUSTODY_BALANCE CUSTODY_BALANCE,
> CAPSREPORT.SCDMASTER SCDMASTER
> WHERE
> CUSTODY_BALANCE.ASSET_ID = SCDMASTER.CUSIP_ID AND
> ((CUSTODY_BALANCE.APPLICATIONCYCLEDATE={ts '2007-03-21 00:00:00'}) AND
> (SCDMASTER.SCTY_CLASS_CODE Not In
> ('BILL','NOTE','BOND','CD','BD','CB','TINT','TPRN','CA','YD')))
>
> Thanks,
>
> Andreas
>
Navigation:
[Reply to this message]
|