[firebird-support] Using PSQL as a function?

2014-04-17 Thread Scott Morgan
I checked the FB Book but can't see anything obvious. Is it possible to use PSQL procedures as functions in SQL? Assuming the procedure only returns one value, and it's type matches as required, something like: SELECT VAL, MY_PSQL_PROC(VAL) FROM SOME_TABLE; or SELECT * FROM SOME_TABLE WHERE VAL

Re: [firebird-support] Using PSQL as a function?

2014-04-17 Thread Thomas Steinmaurer
> I checked the FB Book but can't see anything obvious. > > Is it possible to use PSQL procedures as functions in SQL? Assuming the > procedure only returns one value, and it's type matches as required, > something like: > > SELECT VAL, MY_PSQL_PROC(VAL) FROM SOME_TABLE; > > or > > SELECT * FROM SO

Odp: [firebird-support] Using PSQL as a function?

2014-04-17 Thread liviusliv...@poczta.onet.pl
Hi, You must select from somewhere E.g. use Select c.valc ,(Select p.val from myproc(123)) From sometable Regards, Karol Bieniaszewski - Reply message - Od: "Scott Morgan" Do: Temat: [firebird-support] Using PSQL as a function? Data: czw., kwi 17, 2014 16:22 I checked t

RE: [firebird-support] Using PSQL as a function?

2014-04-17 Thread Leyne, Sean
Thomas, > For pre V3, you can use a selectable stored procedure in something called > inline select: > > select >t.c1 >, (select rvalue from my_psql_proc(t.c1)) as proc_value from >mytable t Another approach, would be to use the SP as a table and join to it, as in: select t.c1

Re: [firebird-support] Using PSQL as a function?

2014-04-17 Thread Scott Morgan
On 17/04/14 15:28, Thomas Steinmaurer wrote: > PSQL-based stored functions are implemented for V3, which is in Alpha > state at the moment, thus not ready for production. Ah, even more to look forward to with v3. > For pre V3, you can use a selectable stored procedure in something > called inli

Re: [firebird-support] Using PSQL as a function?

2014-04-17 Thread Thomas Steinmaurer
Sean, >> For pre V3, you can use a selectable stored procedure in something called >> inline select: >> >> select >> t.c1 >> , (select rvalue from my_psql_proc(t.c1)) as proc_value from >> mytable t > > Another approach, would be to use the SP as a table and join to it, as in: > >s