Highlighted
One Star

Execute file.sql script on firebird data base

Hello.
I have sql file with several updates to do on my firebird database.
Update xpto set a=a;
Update xpto set b=b;
etc...
How can I execute this, since tfirebirdrow, does not support this feature?
3 REPLIES
Employee

Re: Execute file.sql script on firebird data base

You can do it like this :
"begin
execute immediate 'create statement 1';
execute immediate 'create statement 2';
commit;
end;"
Community Manager

Re: Execute file.sql script on firebird data base

Hi
You can read line one by one, and then iterate each sql statement on tFirebirdRow. For example:
tFirebirdConnection
|
onsubjobok
|
tFileInputLine--main(row1)--tFlowToIterate--iterate--tfirebirdrow
|
tFirebirdClose
on tFirebireRow, check the option 'use an existing db connection, set the query as:
row1.line
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Seventeen Stars

Re: Execute file.sql script on firebird data base

Or you can use the component tSQLScriptParser from Talend Exchange which is designed to do exactly this work!