hi, I wanna use the charindex function in the next query

"SELECT * FROM products where mid(productDescrip,1,100) like '%"&
descrip &"%'"

The 100 I need replace it with the initial position of a string like
this

"SELECT * FROM products where
mid(productDescrip,1,inSTR(1,productDescrip,">")) like '%"& descrip &"%'"

and I did this:

"SELECT * FROM products where mid(productDescrip,1,CharIndex('>',
productDescrip,1)) like '%"& descrip &"%'"

but didn't work.

Do you have any idea about?

Thanks a lot!