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 |
|
ramesh.g
Starting Member
11 Posts |
Posted - 2011-08-30 : 03:21:13
|
| Hello,My query is SELECT * FROM tblalumni_member WHERE username in (select * from Split('ramesh,sagar,pravin',',')) AND Is_Approved = 1and username field contain multiple value separated by comma.like ramesh,sachin,pravin.it shuold give all rows if any of get matched in selected result.can you please help me asap. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-30 : 09:40:04
|
why this is not working? whats the issue you're facing? i've written a similar parse function which you can try if you wantSELECT * FROM tblalumni_member tINNER JOIN dbo.ParseValues('ramesh,sagar,pravin',',')f ON t.username = f.ValAND t.Is_Approved = 1Parse values can be found athttp://visakhm.blogspot.com/2010/02/parsing-delimited-string.html------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|