Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: column name as a part of the result set
Brian Peasland <dba_at_remove_spam.peasland.com> wrote in message news:<402BE117.ABDE371F_at_remove_spam.peasland.com>...
> > Is it possible to get the column name as a part of the result in a
> > query without using PL/SQL? I can use a procedure if necessary.
>
> How do you propose to use a stored procedure, but not use PL/SQL?????
>
> It seems to me that you already know the column name. After all, you
> already have the following in your sample SQL statement:
>
> > Select
> > at.ID_COL,
> > at.VAL_COL,
> > column_name (this is what I need)
>
> So why not turn this into:
>
> Select
> at.ID_COL,
> at.VAL_COL,
> "VAL_COL" as column_name
> etc.
>
>
> Does that work?
>
> HTH,
> Brian
>
> --
> ===================================================================
>
> Brian Peasland
> dba_at_remove_spam.peasland.com
>
> Remove the "remove_spam." from the email address to email me.
>
>
> "I can give it to you cheap, quick, and good. Now pick two out of
> the three"
> How do you propose to use a stored procedure, but not use PL/SQL?????
Brain,
Not possible to use SP w/o PL/SQL, of course, just dumb typing on my part.
I know VAL_COL in this example but I will have 30 columns in the real situation. I want to know only (and all) the column names where the value in "at" is different than the value in "bt".
Thanks Received on Fri Feb 13 2004 - 06:40:46 CST
![]() |
![]() |