AnsweredAssumed Answered

SQL Query on Portfolios and IDEAs

Question asked by nmanoha on Jul 4, 2013
Latest reply on Jul 9, 2013 by Sergiu.Gavrila
Hi All,


We are tring to fetch all the Ideas associated with Portfolios and the IDEAs which are converted to Investments and their financials details.

Below is the query used to fetch the details. But I'm not able to get any result want to make sure if the relationship between the tables are correct.

I'm facing issue when i join with Portfolio tables, the ideas relation is working as expected.

Select inv.name, inv.code,
FROM
INV_INVESTMENTS inv
inner join niku.PMA_PORTFOLIO_CONTENTS cont on inv.ID=cont.INVEST_ID
inner join niku.PMA_PORTFOLIOS port on port.ID=cont.PORTFOLIO_ID
inner join niku.inv_ideas idea on idea.id = inv.id
inner join niku.ODF_CA_IDEA ODF on odf.id = IDEA.ID
inner join niku.odf_ca_inv OI on OI.id = idea.id
inner join niku.ODF_OBJECT_INSTANCE_MAPPING MAP on MAP.PRIMARY_OBJECT_INSTANCE_ID = INV.id
inner join niku.FIN_FINANCIALS FIN on FIN .ID = MAP.SECONDARY_OBJECT_INSTANCE_ID;

Thanks

Outcomes