Subject Re: [firebird-support] Re: Stored Procedure as a Function?
Author Martijn Tonies
> > > I also assumed one could do something like
> > >
> > > select foo.col1, xy.outputparam
> > > from foo
> > > join xy on foo.col2 = xy.inputparam
> > >
> > > Though yet again I speak without knowledge, so please tell me whether
I am
> >right or wrong.
> >
> >I've never seen that syntax and according to my
> >Firebird install, it doesn't work either.
> >
> >
> >With regards,
> >
> >Martijn Tonies
>
> No, and there's no reason why it would. A SP has to (1) receive its input
> parameters (2) have somewhere to put its output and (3) actually *execute*
> in order to yield its output or do whatever else it was designed to do.
>
> The answer to the original question is that stored procedures are not
> functions. They provide a way to "pot up" some SQL operations inside a
> black box. UDFs, by contrast, operate only on constants: they don't
> perform database operations.

Which - of course - brings us a new question... Would it be possible to
create/sponsor functionality for an inline function created with
CREATE FUNCTION for Firebird 2.0? :-)


With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird & MS SQL Server.
Upscene Productions
http://www.upscene.com