Need help: ¿how can I execute a pl/sql block?

One Star

Need help: ¿how can I execute a pl/sql block?

Hello, I've seen the component tOracleSP but my pl/sql block is not stored in the DB, I want to execute it directly. I'm using tOracleRow but it sends me an error and I don't know how solve it.
The PL/SQL block is that:
"begin
for cur in (select owner, constraint_name , table_name
from all_constraints
where owner = 'COMPRAS' and
TABLE_NAME = 'FT_COMPRAS';
execute immediate 'ALTER TABLE '||cur.owner||'.'||cur.table_name||' MODIFY CONSTRAINT '||cur.constraint_name||' ENABLE';
end loop;
end;"
That block works good in SQL Developer or SQL PLUS.
Thanks
PD: ok, already solved, damn pl/sql automatically generated...
Community Manager

Re: Need help: ¿how can I execute a pl/sql block?

Hi
Glad to see you have figured it out!Smiley Wink
Bestt regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Need help: ¿how can I execute a pl/sql block?

I'm trying to execute an anonymous PL/SQL block from a tOracleRow component as well. What was the solution?
Thanks,
Dave
One Star

Re: Need help: ¿how can I execute a pl/sql block?

Hello,
I am using Talend DI latest version i.e. 5.5.1 and having a problem with Toraclerow.
I just want to execute a simple Anonymous PLSQL block in Talend.
here the sample code
BEGIN
DBMS_OUTPUT.PUT_LINE('Test tOraclerow for anonymous PLSQL block')
END;
i have been using this component in previous talend versions, there i didnt face any issue.
However in 5.5.1 same code is not working
Here the job flow.
trowgenerator--->tOracleRow
Can any one of you please help me out.