1
Good afternoon, I have a table that has names. In some lines the name is separated by comma. Ex: Alberto, Luiz
I want to change these lines to stay Luiz Alberto
DECLARE
final VARCHAR(50);
inicio VARCHAR(50);
string_pronta VARCHAR(110);
BEGIN
SELECT substr(NOME, instr(NOME, ',') + 1) into final FROM participantes;
SELECT substr(NOME, 1, instr(NOME, ',') - 1) into inicio FROM participantes;
string_pronta := inicio || ' ' || final;
UPDATE participantes
SET NOME := string_pronta;
END;
Axelmar, you just want to remove the comma?
– Filipe L. Constante