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 |
nayanancha
Starting Member
27 Posts |
Posted - 2012-02-23 : 09:12:19
|
I have a table with Column name 'Roles' which has 3 roles.So when I do Select Roles from TableI get AdminCustomerSalesRepSo I need to check for a string 'Admin' if its there in this column. How can I check this?Thanks, |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-23 : 09:17:51
|
Select Roles from Table WHERE Roles = 'Admin'------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
nayanancha
Starting Member
27 Posts |
Posted - 2012-02-23 : 09:46:34
|
I have a string as Roles='Admin,Customer,SalesRep'So I have a function which takes that string and returns a column with valuesColumn------AdminCustomerSalesRepSo I need to check for a particular Role 'Admin'If(Role='Admin' exists in that Column)Do this So I need to check that If condition.Thanks,Nayan |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|