MS-ACCESS value selection

Hi

I have the following table :

ID  WEIGHT    PRICE
1       200          6.50
2       300          8.50
3     1000        10.00
4     5000        20.00

I'm trying to query this table in order to select the right delivery price according to max weights
i.e. for a 350grs parcel the shipping cost will be 10.00

I'm not sure how to formulate my query to obtain the correct value

Any ideas ?

thanks
yann
Yann ShukorOwnerAsked:
Who is Participating?
 
Pawan KumarDatabase ExpertCommented:
Please use this query -

--


SELECT MIN(PRICE) as PRICE
FROM yourTableName 
WHERE [WEIGHT] >= 350
--

Open in new window


OUTPUT

--
PRICE
10.00

--

Open in new window

1
 
Pawan KumarDatabase ExpertCommented:
Edited my last comment.
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.