ru doing a search engine ? for this u need to use split function. first u need to split the skills based on ; and second again split each skill based on - and search for java and 24 months. on the second split u need to keep them in different strings or array in two locations like arr[0]="java" and arr[1]="24" and now compare if arr[1]>=12 if so then print arr[0]. this is because u know tht arr[0] , arr[1] are from same string(split). if u use differnt strings then no problem, take in st1="java" st2 ="24" (the splited string in these strings) now convert.toint32(st2)>12 then print st1 declare @x varchar(50) set @x='J2EE-24' select * from test1 where skills like '%'+@x+'%' u have to pass the values "skills-exp" as string to sp try this.May be this will work.For more clarification call me