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.
| Author |
Topic |
|
moiseszaragoza
Starting Member
8 Posts |
Posted - 2009-06-27 : 21:11:37
|
| I need to select a range of things like SELECT * FROM TABLE WHERE (DOB < lowDate AND DOB > hiDate)AND (ShoeSize < lowNum AND ShoeSize > hiNum)Is this correnct? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-28 : 00:41:23
|
| the syntax looks fine. to suggest if query will give you what you're looking for we need to understand what you're trying to achieve. can you explain your requirement using some sample data and desired o/p in below formathttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-06-28 : 12:36:10
|
This selection retieves only younger and older people AND only little feet and big feet because your given "range" is not between the given values.Is that what you want?Fred No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
moiseszaragoza
Starting Member
8 Posts |
Posted - 2009-06-28 : 14:01:09
|
| Well well what i need is to be able to select ranges of difent valujes. like every one that is 15 to 20 and have a shoe side of 8 to 12Just keep smiling |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-28 : 14:18:56
|
then i think what you need isSELECT * FROM TABLE WHERE (DOB >= 15 AND DOB <= 20)AND (ShoeSize >= 8 AND ShoeSize <=12) |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|
|