it may be clearer if you translate to the conventional logical operators. the index function looks in a "haystack" for a needle. the result returned in the character position where the needle string was found. It is zero if it is not found. so greater than zero and not equal to zero have the same result. see the second solution I posted to show the cryptic one-line solution in several steps. SELECT IF (INDEX(UPCASE(Protein),'COCHLEAR') <> 0) the outer set of parentheses shows that the whole conditional clause is one entity The outer parentheses are unnecessary but do no harm and can facilitate reading. upcase changes the haystack i.e., protein in this case to upper case (capital) characters. note the needle is in upper case. "open angle bracket" "close angle bracket" means "not equal" NE using NE for not equal becomes SELECT IF (INDEX(UPCASE(Protein),'COCHLEAR') NE 0) select if index(lower(Protein),'cochlear')>0. the haystack is changed to lower case, the needle is lowercase. the "close angle bracket" means greater than GT these two do not change the case of the string to all one or the other of uppercase or lowercase. they have two open parentheses but only one close parentheses. Select if index((Protein),'cochlear')>0. Select if index((Protein),'cochlear')<>0. Art Art@DrKendall.org Social Research Consultants University Park, MD USA (301) 864-5570 Rowani Mohd Rawi wrote: >Hi thanks every one for the help, >I have experimented with the number of syntax suggested and they all seems to work. I am just beginning to experience with syntax and is a bit confused with a number of things. Could I now ask what's the difference in between the following syntax, they all seems to produce similar results: > >SELECT IF (INDEX(UPCASE(Protein),'COCHLEAR') <> 0) >select if index(lower(Protein),'cochlear')>0. > >Select if index((Protein),'cochlear')>0. > >Select if index((Protein),'cochlear')<>0. > >Next question is, once the data is transformed, I lost all my other cases. I am working with temporary files, thus its okay. However what do I put in the script to prevent loosing other cases or to open up the transformed data into a new file. > >Thank you > >Rowani > > > >