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 |
|
Arun.G
Yak Posting Veteran
81 Posts |
Posted - 2010-05-26 : 01:43:21
|
| I have one master table which contains datfor example: Tablerolesroleid roles1 trainee2 leader3 supervisor etc, Now I have another table: Tableprofileex:prid name designation roles1 aaa uuu 1,2In role column i want to get the multiple roles for one person and also want to store that id of roles only, but in front end i have option to select only rolename from dropdown list, but in backend it should stored as id onlyhow to write query for this? |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-05-26 : 02:32:49
|
| Split the data in Front end, it is much simple and effective.Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
Asken
Starting Member
38 Posts |
Posted - 2010-05-27 : 05:39:45
|
I'd split the roles up in another table i.e.CREATE TABLE TableProfileRole ( roleid int, prid int)INSERT TableProfileRole VALUES (2, 1)INSERT TableProfileRole VALUES (2, 2)and join on that table as well. I don't really think storing referenced data as composite is good practice. Reporting & Analysis SpecialistHelping others helps me get better... |
 |
|
|
|
|
|