Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: forms question: binding client side package functions to block where clause

Re: forms question: binding client side package functions to block where clause

From: mcstock <mcstockspamplug_at_spamdamenquery.com>
Date: Thu, 6 Nov 2003 08:55:56 -0500
Message-ID: <SY2dncV6S5mDzjeiRVn-vg@comcast.com>


client side code is on a different machine than the database, so it is not available to the SQL parser at the time the statement is executed.

if it is necessary to include the result of a local function in the WHERE clause for a block, use a PRE-QUERY trigger on that block to set the value of the appropriate item to the result of the function

however, in this example, it does not seem necessary -- simply create a block that is not based on a table and programmatically populate its items, setting appropriate properties so the block cannot be queried, updated, etc., rather than perform unnecessary database IO

"p!" <p!@unix.ndo.co.uk> wrote in message news:3faa4c55.14708687_at_news...
> Hi,
>
> Does anyone know if it is possible, and if so how, to use a function
> in a client-side PL/SQL package as a bind variable for the where
> clause of a block?
>
> example:
>
> package body test is
> function get_value return varchar2 is
> begin
> return 'X';
> end;
> end;
>
> then having a database block based on DUAL to have a where clause of:
>
> dummy = test.get_value
>
> so that when execute_query is called on the block it would return the
> row (or rows, but with this example one would hope it would be
> singular!) which match the value returned by the function?
>
> I have tried doing it the obvious way, just putting the where clause
> in the style above, but it generates the error "ORA-00904 - invalid
> identifier"
>
> btw we are using oracle 9ir2 with forms 9i (version 9.0.2.11.0)
>
> Any help greatly appriciated!
>
> thanks,
> p!
>
Received on Thu Nov 06 2003 - 07:55:56 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US