| Author |
Topic  |
|
|
QuietRiot
Yak Posting Veteran
67 Posts |
Posted - 11/16/2007 : 12:36:57
|
select * from dbo.FundTransactionLines where postingdate = '2007-11-01'
select * from subaccountcurrentholdings
i only need totalshares from subaccountcurrentholdings and I need everything from fundtransactionlines
they both have accountnumber and FundId in common
want this displayed as 1
thanks
|
|
|
anonymous1
Posting Yak Master
185 Posts |
Posted - 11/16/2007 : 12:47:45
|
fields and a good definition of the desired results would be more helpful, here is a guess from the limited information... select * from dbo.FundTransactionLines left join ( select fundid, sum(shares) as totalshares from dbo.subaccountcurrentholdings group by fundid ) as totalshares on totalshares.fundid = dbo.FundTransactionLines.fundid where dbo.FundTransactionLines.postingdate = '2007-11-01'
|
 |
|
|
QuietRiot
Yak Posting Veteran
67 Posts |
Posted - 11/16/2007 : 13:56:38
|
Ok,
so I need AccountNumber, FundId, ProcessingDateTime, TransactionID, CustomTransactionCode, TradeDate, PricerPerShare, GrossAmount, NetAmount, ShareAmount, FeeAmount
from Table: FundTransactionLines
then I want to add TotalShares from the SubAccountCurrentHoldings table based on AccountNumber and Fundid from transactionLines table.
also I need it where FundTransactionLines.postingdate = '2007-11-01' |
Edited by - QuietRiot on 11/17/2007 13:21:56 |
 |
|
|
QuietRiot
Yak Posting Veteran
67 Posts |
Posted - 11/17/2007 : 13:22:53
|
I edited the above to make more sense. Any help?
|
 |
|
| |
Topic  |
|