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 |
|
paulmoss
Starting Member
14 Posts |
Posted - 2010-12-17 : 05:01:04
|
| Hi I apologise if this question has been answered else where, if so please point me in the right direction.We are currently running an application that uses SQL Server 2005.We have a field that contains information from a multiselect box. So the data held in it is separated by commas. The data in this field is abreviated. For example; tech,inst, etc etc. The way the application is written, there is another table that holds translations for all fields. So for example in the translation table there is an entry for tech which gives you a translation of technicalIs there anyway when creating a view to separate the values from the multiselect field, so that we can get the values to match those in the translation table.I apologise if this is not clear, and will try and answer and questions put to meThanks in advance for your helpMany thanksPaul |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-12-17 : 05:10:45
|
select * from Translation where ',' + replace(@multiString,' ','') + ',' like ','+TableColumn+',' No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-12-20 : 06:46:43
|
| ',' + replace(@multiString,' ','') + ',' like '%,'+TableColumn+',%'MadhivananFailing to plan is Planning to fail |
 |
|
|
paulmoss
Starting Member
14 Posts |
Posted - 2010-12-20 : 07:01:24
|
| Thanks everyone for your responses they have helped me solve my problemRegardsPaulMany thanksPaul |
 |
|
|
|
|
|
|
|