replicating CHARINDEX with a new user defined function in mysql
<p>Can some one replicate CHARINDEX with new user defined function. (using instr)</p>

<pre><code>IF(CHARINDEX('(G)',v_username) = 0) THEN
</code></pre>

<p>mysql version. If could keep the function same my migration will be become more smooth.</p>

<pre><code>IF(INSTR(v_username,'(G)') = 0) THEN
</code></pre>