Hi,you misunderstood me.One alternative is this query, which works:select cu.Currencies_ShortNamefrom dbo.Currencies cu inner join (select p1.Pairs_Shortname as f1, right(p1.Pairs_Shortname,3) as Currency1,/*v2*/ SpotBid, SpotAsk from dbo.Pairs p1 inner join dbo.PairsQuotes pq1 on p1.Pairs_Id=pq1.Pairs_Id and pq1.PriceDate=(select max(PriceDate) from dbo.PairsQuotes) where p1.Pairs_Shortname like 'EUR%' ) as sr on cu.Currencies_ShortName=sr.Currency1
Second alternative is this query, which doesnt work:select cu.Currencies_ShortNamefrom dbo.Currencies cu inner join (select p1.Pairs_Shortname as f1, right(p1.Pairs_Shortname,3) as Currency1,/*v1*/ max(SpotBid) as SpotBid, max(SpotAsk) as SpotAskfrom dbo.Pairs p1 inner join dbo.PairsQuotes pq1 on p1.Pairs_Id=pq1.Pairs_Id and pq1.PriceDate=(select max(PriceDate) from dbo.PairsQuotes) where p1.Pairs_Shortname like 'EUR%' /*v1*/ group by p1.Pairs_Shortname, right(p1.Pairs_Shortname,3)) as sr on cu.Currencies_ShortName=sr.Currency1
Katarina