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 |
|
Mageshkumar
Starting Member
29 Posts |
Posted - 2008-08-11 : 08:19:40
|
| Hi i have a table like this,Id dep mar100 MCA,MBA,MSC 80101 B.Sc,BBA,MCA 60102 B.Tech,MBA 60Now if i give Dep=MCA the i need o/p id 100 & 101 have to comegive me a query for this |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-11 : 08:21:21
|
| declare @searchstr varchar(100)set @searchstr='MCA'select * from Yourtable where ','+dep+',' LIKE '%,'+@searchstr + ',%' |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-11 : 08:39:03
|
| Also read about NormalisationMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|