Hey! So this is my first post on this forums and ive been searching around the forums for an answer, but can't seem a simple solution. I've been given this access database problem by my company, im actually just an engineer by degree, so im not really use to building databases, so I was wondering if anyone could help me.
Basically, we are buying materials from a supplier. The suppliers give dates where prices are valid from. I have a query which chooses the valid prices for each material. Now im trying to figure out how to choose the minimum price between different suppliers for the same material.
Query 1 (finds the valid prices from a list of prices)
Component A
Price $30 Valid from 01/01/2011 to 01/01/2012
Price $40 Valid from 01/01/2002 to 01/01/2013
So now I want to choose the lowest price between suppliers. The above query gives:
Supplier ID ....... Material ID ........ Price
1 ..................... 58712 .............. $40
2 .....................58712 ............... $50
3 ..................... 99998 ............... $23
Im just confused how I program access to choose supplier 1.. Ive tried grouping the material ID, and finding the min price, however that just chooses $40 but not the corresponding supplier ID...Also I was wondering whether it is possible to do this under one query...
Thanks for any help!!!
Basically, we are buying materials from a supplier. The suppliers give dates where prices are valid from. I have a query which chooses the valid prices for each material. Now im trying to figure out how to choose the minimum price between different suppliers for the same material.
Query 1 (finds the valid prices from a list of prices)
Component A
Price $30 Valid from 01/01/2011 to 01/01/2012
Price $40 Valid from 01/01/2002 to 01/01/2013
So now I want to choose the lowest price between suppliers. The above query gives:
Supplier ID ....... Material ID ........ Price
1 ..................... 58712 .............. $40
2 .....................58712 ............... $50
3 ..................... 99998 ............... $23
Im just confused how I program access to choose supplier 1.. Ive tried grouping the material ID, and finding the min price, however that just chooses $40 but not the corresponding supplier ID...Also I was wondering whether it is possible to do this under one query...
Thanks for any help!!!