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: CHC <qi.xiang.chi_at_icu.nl>
Date: 2000/05/30
Message-ID: <8h0a6b$h3b$1@beast.euro.net>#1/1

I think you should make a stored procedure of it. Then you can use 0, 1 or 2 as input parameter.

Rgrds, CHC
  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