Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
QuietRiot
Yak Posting Veteran
67 Posts |
Posted - 2007-11-16 : 12:36:57
|
select * from dbo.FundTransactionLines where postingdate = '2007-11-01'select * from subaccountcurrentholdingsi only need totalshares from subaccountcurrentholdings and I need everything from fundtransactionlinesthey both have accountnumber and FundId in commonwant this displayed as 1thanks |
|
anonymous1
Posting Yak Master
185 Posts |
Posted - 2007-11-16 : 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.FundTransactionLinesleft join(select fundid, sum(shares) as totalsharesfrom dbo.subaccountcurrentholdingsgroup by fundid) as totalshareson totalshares.fundid = dbo.FundTransactionLines.fundidwhere dbo.FundTransactionLines.postingdate = '2007-11-01' |
|
|
QuietRiot
Yak Posting Veteran
67 Posts |
Posted - 2007-11-16 : 13:56:38
|
Ok,so I need AccountNumber, FundId, ProcessingDateTime, TransactionID, CustomTransactionCode, TradeDate, PricerPerShare, GrossAmount, NetAmount, ShareAmount, FeeAmount from Table: FundTransactionLinesthen 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' |
|
|
QuietRiot
Yak Posting Veteran
67 Posts |
Posted - 2007-11-17 : 13:22:53
|
I edited the above to make more sense. Any help? |
|
|
|
|
|
|
|