Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Select with BETWEEN

Author  Topic 

ckuo@kahluadesigns.com
Yak Posting Veteran

58 Posts

Posted - 2002-05-06 : 11:32:16
Hi,
I have the following table
WeightMin WeightMax Price
100 199 10.99
200 300 11.99

How can I select the Price if my weight criteria is say 150? Should return 10.99 becuase its between WeightMin and WeightMax, or is there a better way to design this?

Thanks a bunch

Nazim
A custom title

1408 Posts

Posted - 2002-05-06 : 12:04:53
select price
from tablename
where 150 between weightmin and weightmax

HTH

--------------------------------------------------------------
Go to Top of Page
   

- Advertisement -