>>Is this a Firebird 2.5 database with dialect 3 (if the database was created 
>>with InterBase before Firebird was born, 
>>it could be dialect 1, if it is a newer database it is most likely dialect 3 
>>unless it is explicitly set to a 
>>different dialect)?
>>
>>I created two tables (MACCOUNTS & SSALEINVOICEFOOTER), added the records you 
>>mentioned and ran the SQL through 
>>Database Workbench before I posted my reply, so the code ought to work. To me 
>>it seems as whatever tool you're using 
>>to execute the query thinks that the semicolon actually ends the query rather 
>>than being part of the statement. You
>>could of course try 
>>
>>SET TERM ^^ ;
>>
>>before EXECUTE BLOCK, but I've never had to do that with EXECUTE BLOCK. I'm 
>>sorry that I've no other suggestion for
>>you, if the database is not Firebird 2.5 with dialect 3 (OK, I jumped 
>>directly from Firebird 1.5 to Firebird 2.5, so 
>>I'm not certain whether it will work with older Firebird 2.x), then I simply 
>>don't think my suggestion can help you.
>
>Yes you are correct Set maybe I will have to update to FB 2.5 because I am on 
>2.1.4 still.  Glad to know you did the jump, 
>I was think to jump to FB 3 directly when it comes but I guess I will have to 
>update to 2.5 inbetween.

Thinking about it, Bhavbhuti, EXECUTE BLOCK is more or less an 'unstored' 
procedure. So you could try replacing EXECUTE BLOCK with CREATE PROCEDURE 
(though I haven't tried this yet and cannot do it from where I'm sitting just 
now). Though I don't know why EXECUTE BLOCK didn't work for you, according to 
the release notes it has been available since Fb 2.0 (although changed) and 
CTEs since Fb 2.1. And there's nothing complicated in what I'm doing (the 
resulting query is a bit complex, but selecting a string cannot be considered 
complex). What tool are you using when you get the error?

Set

Reply via email to