Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: "instead of select" trigger
"Christian \"Raistlin\" Gulich" <Christian.Gulich_at_IN.Stud.TU-Ilmenau.de> wrote in message news:<c8vfe9$d1d$1_at_piggy.rz.tu-ilmenau.de>...
> "dnh" <nogood_at_using.this.addr.com> schrieb im Newsbeitrag
> news:40b2c233$1_at_cpns1.saic.com...
> > One word - VIEWS
>
> I have to pass parameters to the procedures, depending to the current query.
> If it isn't possible, to get the querieng sql statement in a view to pass it
> to the procedures, views are not a solution for me.
>
> Christian
You can use a function and pass it parameters. It can only return a single value. You should be careful because whatever processing is done in the function is done for each row when used in a select statement. I believe this term is "in-line function". An example of how you could use this passing 2 parameters which in this case would be values from 2 columns in the employee table is:
SELECT EMPLOYEE.NAME,
EMPLOYEE.PHONE, FN_MYFUNCTION( EMPLOYEE.NAME, EMPLOYEE.PHONE ) AS SOME_ALIASFROM EMPLOYEE
--DO WHATEVER YOU WANT, PUT THE DESIRED VALUE -- INTO RETURN VARIABLE O_RETURN_STRING := 'SOMEVAL';
Jeff Received on Wed May 26 2004 - 06:54:38 CDT