Retrieve only the first record from a LEFT JOIN(diaryofaninja.com)
submitted by
wiredone(917) 2 years, 6 months ago
Recently I was working on a project where I had to return a simple list of products, and if they had images associated with them, return information about only one along with the product. Times like these, a simple left join or inner join just doesn’t cut it if there are more than one image/record per product. When this happens there is almost always a simple solution, so let’s take a look.
|category: Database
|Views: 28
tags:
ms-sql sql-server-2005 Database SQL another
Everyones tags:
Your Tags: