Can you make this join 1 to 1 ? b.BRL_ID = d.BRL_ID
Where did you read that DISTINCT had a high cost associated with it?
Seth Phelabaum
Consistency is only a virtue if you're not a screwup. 😉
Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]