Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking records to a lookup table

Status
Not open for further replies.

coopster

Programmer
Dec 13, 2004
2
GB
I have a table of products which have related prices (the prices are linked by a lookup).

How can i construct a query that will pull my products while including the related prices (from the lookup which links to the size table) and then be able to sort by the min price for each?

I have my existing query if its of any help...
 
The products can have many prices, but on my listing screen i want to display the products by their min (grouped) price - while not showing all of them until the main display screen (once clicked thru).
 
A starting point:
SELECT A.name, Min(B.price)
FROM tblProducts A INNER JOIN tblPrices B
ON A.ID = B.productID
GROUP BY A.name

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top