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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Text Search

Author  Topic 

charul
Starting Member

18 Posts

Posted - 2008-10-17 : 00:24:15
In one of my Reports i display the Qualification ( a field)
as values separated by commas.
Like suppose Employee A has 3 Qualification in our DB
HSC,SSC and BE
So the value displayed is 'HSC,SSC,BE'.
Now i need to search all the employees who have Quali in SSC.
How to achieve this.

yazasi
Starting Member

11 Posts

Posted - 2008-10-17 : 00:40:18
Do the 'HSC,SSC,BE' show all within that field or just one of them?
Go to Top of Page

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2008-10-17 : 09:38:20
Select * from TableName
where Qualification like '%SSC%'
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-17 : 09:45:53
this will return any other qualification records having pattern SSC in it also. to return only exact record try this out

Select * from TableName
where ','+Qualification+',' like '%,SSC,%'
Go to Top of Page
   

- Advertisement -