• kevin.l.williams (7/12/2010)


    ...Would it have been too difficult to return the string unmodified if there was a NULL detected? ....

    Actually, I think the answer to that would go back to the more general question of handling NULL consistently. Of course it wouldn't have been difficult to have the function do that, but would it have been the right thing to do?

    The QOD not only calls our attention to this specific behavior in the REPLACE() function, but also to the general issue of understanding and programing to handle NULL. The proposal to have REPLACE() return an unmodified string would essentially depend on treating a NULL third parameter as an empty string, which it is not.