I am going to explain this through an example, Suppose I have a table called "MY_BLOG" with two columns, "BLOGPOST" and "STATUS" I need to update the STATUS if certain word occurs in BLOGPOST column, here's the querry I usually use for this purpose: running this query will set the STATUS to "0" for all the rows where BLOGPOST column has word "viagra" in it. Now what I need is to be able to execute query only if BLOGPOST column has the word "viagra" more than 3 times in one row. Any suggestions how to do it?