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

Home -> Community -> Usenet -> c.d.o.server -> Re: Parameterized Views

Re: Parameterized Views

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: Wed, 13 Aug 2003 22:55:22 +1000
Message-ID: <3f3a3560$0$10356$afc38c87@news.optusnet.com.au>


"Brian Kramer" <bug0926_at_yahoo.com> wrote in message news:41d6bfd4.0308130423.6dcee641_at_posting.google.com...

> In a nutshell we have the userid in a web application and we need a
> way to get it to the database so a view can be created that filters
> based on the userid.

Build a stored PL/SQL function that accepts the userid as a parameter and builds the SQL dynamically, adding the userid as a bind variable. Open a REF CURSOR with the SQL string and return it. It's in the PL/SQL manual how to do this. Call the function from the web application using CallableStatement or similar interface, passing the userid. CallableStatement works from both JDBC and ODBC.

HTH

--
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Wed Aug 13 2003 - 07:55:22 CDT

Original text of this message

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