I have the following query:
select MV.MVDate, DE.DataEntryID,
from [Customer].[snp].[MarketValueSnap] MV
inner join [Customer].[dbo].[cbiCurrency] CU ON MV.CurrencyID = CU.CurrencyID
inner join [Customer].[dbo].[cbiDataEntry] DE ON MV.DataEntryID = DE.DataEntryID
I then have a table called: docNote
In this table it has the following fields:
What I need to do somehow is get the Note from this table where EntityID = 9 (DataEntry) and InstanceID = DE.DataEntryID from my query. I only want to get the 1st note just in case there is more than one to protect myself. What is the best way to handle this?