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 |
|
daniel.newman@bis-web.net
Yak Posting Veteran
71 Posts |
Posted - 2001-09-14 : 09:38:42
|
| Hello all,I have another work-around, but thought I'd ask the question here, incase this is the better way of doing this?I have some users who can select some options. I just need to know how to store this data, and then how to search against it.I could have a table tblSelections with four columns: email, area, salary, type, and these could contain values like:email: test@test.comarea: 1,5,8salary: 1,2type: 1,6,9,16This seems an efficient way of holding the data, but if I want to find all users who have selected an area of 5, a salary of 2 and a type of 1, can I do this using the above table structure?I could always have four tables:tblUsers (UserID, Email)tblArea (UserID, AreaID)tblSalary (UserID, SalaryID)tblType (UserID, TypeID)And inner join them all together (allowing for them to have no value selected as a wildcard)Which is better (for managability and speed), and how could I do the above search?Thanks. |
|
|
|
|
|
|
|