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: giving field name as variable of a function

Re: giving field name as variable of a function

From: Tony Colston <agcolston_at_buckman.com>
Date: Wed, 2 Jun 1999 09:10:56 -0500
Message-ID: <7j3e6q$vjk$1@news.socomm.net>


I think that you can do this kind of thing with the DBMS_SQL package. It lets you create SQL on the fly and execute it.

Tony

Diablo <diabl_at_email.com> wrote in message news:7j2r5j$hqt$1_at_usenet48.supernews.com...
> I need to write a function that takes a field name as variable like this:
>
> Function F_PUR_F05
> ( FieldName IN VARCHAR2)
>
> cursor C_PER is
> SELECT * FROM sometable
> WHERE FieldName ='XXXX';
> .......
>
> But I could not do it as it does not recognize varchar2 as a fieldname..
> Any ideas?
>
> Any help would be appreciated.
>
>
>
>
Received on Wed Jun 02 1999 - 09:10:56 CDT

Original text of this message

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