I know its going to be something I'm doing wrong, but I have the following:select ri.*,mg.Name,mg.IsrCode,mg.IsrName,mg.IsrPrimary,mg.ticker,mg.name,mg.type,mg.sector,mg.sectordes,mg.indgroup,mg.indgroupdes,mg.industry,mg.industrydes,mg.subind,mg.subinddesfrom RussellIndex_View ri left join MarketQA_EquityGicsData mgon ri.cusip = mg.cusip left join BloombergEquityPricingData bp on ri.cusip=substring(bp.id_cusip,1,8)]
I dont have any issues with the query until I add the stuff in red, than all the sudden my result set starts showing me several records for the same cusip over and over again. I am always iffy with join, any help would be helpful. I am basically looing to match all the cusips from RussellIndex_View, include some information from MarketQA_EquityGicsData and that works fine, but than I want to also add some info from BloombergEquityPricingData, and match on cusip, there could be cases where the cusip column on the bloomberg side has null values