Hi Dorin
>How did you created, via ISQL ?
I used IBExpert (as you had suggested previously) to create the thing and the DDL was from it.
it turns out that I am supposed to use it like this as per suggestions
>>SELECT (SELECT bOSDrAmt FROM OSAcctDrAmt(s.bDrAmt, uf.bDr, uf.bCr)) AS bBalDr, ....
Thanks again for your help, with it I was able to create the first FireBird stored procedure, seriously.