sql - Replace all occurrences of more than one whilespace character with a single one -
input:
rammar narayana raja rani.
output:
rammar narayana raja rani.
in c# code oculd this:
while (name.contains(" ")) { name = name.replace(" ", " "); }
that replaces double single spaces , should store in same variable. here want replace more 1 whitespace in string 1 whitespace, occurance. how can in oracle sql?
try way:
select regexp_replace('aa b cc d e f ', '( ){2,}', ' ') dual;
for details, see here; it's 1 of examples.
Comments
Post a Comment