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 |
Dasman
Yak Posting Veteran
79 Posts |
Posted - 2011-06-01 : 14:11:39
|
Hello Everyone:Individually these two SELECT statements work:SELECT * FROM table_nameWHERE WeightBETWEEN 60 AND 80ORDER BY Weight DESCSELECT * FROM table_nameWHERE HeightBETWEEN 1.8 AND 1.9ORDER BY Height DESCand it results in two tables. Is there anyway to find the data that intersects between these two queries?Thanks,Dasman |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-06-01 : 14:17:54
|
Intersection:SELECT * FROM table_nameWHERE WeightBETWEEN 60 AND 80 ANDHeightBETWEEN 1.8 AND 1.9ORDER BY Weight DESC |
|
|
Dasman
Yak Posting Veteran
79 Posts |
Posted - 2011-06-01 : 14:22:30
|
Just to clarifyMy end goal would be to get a table of people whos weight is from 60 to 80 and height between 1.8 to 1.9.The data for both of the select queries are from the SAME table just two different columns in the same table. |
|
|
Dasman
Yak Posting Veteran
79 Posts |
Posted - 2011-06-01 : 14:24:16
|
Thank you soo much! It works! :) |
|
|
|
|
|