Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!
create or replace FUNCTION Proc(schema_name in VARCHAR) RETURN NUMBER IS SQL_TXT VARCHAR(700); BEGIN SQL_TXT:= 'UPDATE '||schema_name||'.my_table x set ( line ) = ( select y.val from (select emp_no, line, row_number() over (partition by emp_no order by line ) as val from '||schema_name||'.my_table ) y where x.emp_no = y.emp_no and x.line = y.line) EXECUTE IMMEDIATE SQL_TXT; RETURN SQL%ROWCOUNT; EXCEPTION WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM); RETURN -1; END;
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.