views:

227

answers:

3

Hello, is there any way to execute multiple statements (none of which will have to return anything) on Firebird? Like importing a SQL file and executing it.

I've been looking for a while and couldn't find anything for this.

+1  A: 

Shouldn't the normal query-delimiter work? Like:

Update stuff; Delete stuff; Update stuff;
Bobby
It doesn't. So if I have let's say 2 alter statements to execute firebird complains about "Invalid token.Dynamic SQL Error.SQL error code = -104.Token unknown - line 2, column 1.alter."
Aldo
Bobby is right, quey-delimiter is the normal separator. Only two comments: If you are using a tool like FeniSql you must execute the "execute script" command instead of "execute sql statement". Also, for procedures you must use the funny syntax "Set Term ^; .... Set Term ;^" and use ^ as delimiter inside the procedure.
DaniCE
I am using IBExpert, guess I haven't found yet where execute script is. I executed the same SQL file with FenixSQL and it worked. Bunch of thanks
Aldo
A: 

You can do this with IBOConsole (download from www.mengoni.it). The SQL window allows you to enter a complete script with the usual ";" delimiter.

Smot
A: 

In IBExpert you can execute multiple commands in single script via Tools->Script Executive (Ctrl+F12)

☭☭☭ USSR ☭☭☭

P A V L I K