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: Require Col on the fly

Re: Require Col on the fly

From: Bonyata <jalexander_at_summitsoftwaredesign.com>
Date: 2000/05/30
Message-ID: <vZTY4.5980$%c6.39048@typhoon.tampabay.rr.com>#1/1

The dbms_sql package allows you to create a string containing queries, procedure calls, etc and then execute it. Look at Trezzo's Oracle PL/SQL Tips and Techniques or some similar PL/SQL reference book for examples of its use.

Kashif Ahmed <kashif-a_at_cyber.net.pk> wrote in message news:3933A92D.FD76DEE0_at_cyber.net.pk...
Dear
I have "fld0", "fld1", "fld2" column names in my table and now in select statement I need to make the col name on the fly as, select fld|| <x> from mytable;
<x> = it must be the value what I give input e.g 0, 1, or 2. I want to select the particular column value what I insert as input or whatever the value of x. (0, 1, 2) .
select fld||'0' from mytable; ==== > doesn't work Please tell me how do I solve this.
Best Regards
Kashif Ahmed Received on Tue May 30 2000 - 00:00:00 CDT

Original text of this message

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