Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Require Col on the fly
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
![]() |
![]() |