I'm trying to take this string
where lowercase(pdd.last_name) like 'albert%'
and replace "pdd" with "p" using this function
sb.replace(queryAdd.indexOf("pdd"), (queryAdd.indexOf("pdd") + 3), "p");
where sb is a StringBuffer, but it doesn't work and here's what it actually returns
where lowercase(pdpast_name) like 'albert%'
Why does this not replace "pdd" with "p"?