Oracle's concat() function only takes two arguments. You could nest calls but that's messy:
CONCAT(CONCAT(CONCAT('UPDATE HCAlerta SET descricao="', descricao,), '" WHERE neoId='), neoId)
It's simpler to user the concatenation operator:
'UPDATE HCAlerta SET descricao="' || descricao || '" WHERE neoId=' || neoId
But your quotes are wrong; double quotes surround an identifier, like a table or column name, not a value; so you need single quotes - but need to escape them:
'UPDATE HCAlerta SET descricao=''' || descricao || ''' WHERE neoId=' || neoId
In your query that would then be:
select'UPDATE HCAlerta SET descricao=''' || descricao || ''' WHERE neoId=' || neoId
from HCAlerta
db<>fiddle demo (which isn't displaying the multibyte characters properly; but that's an issue with that environment, not the query...).
You could also use the alternative quoting mechanism but that is maybe more confusing in this particular case.
unfortunately returned to me Error: ORA-00923: FROM keyword not found where expected
If you have a LONG column then you could use a PL/SQL block to handle it:
begin
for r in (
select neoId, descricao from HCAlerta
)
loop
dbms_output.put_line('UPDATE HCAlerta SET descricao=''' || r.descricao || ''' WHERE neoId=' || r.neoId);
end loop;
end;
/
... remembering to enable output in your client (e.g. set serveroutput on in SQL*Plus etc.).
db<>fiddle
It might be easier to take a complete copy of the table and restore it if necessary; or export/import, etc.
concat()only accepts two parameters in Oracle. Use||insteadSELECT CONCAT('UPDATE HCAlerta SET descricao="'|| descricao || '" WHERE neoId=' || neoId) from HCAlerta||instead ofconcat(), not within it. You've gone from four arguments to one.Erro: ORA-00911: invalid character