Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Need to get the output of a column with its column name in as rows

RE: Need to get the output of a column with its column name in as rows

From: Guang Mei <gmei_at_incyte.com>
Date: Thu, 03 Jul 2003 06:55:35 -0800
Message-ID: <F001.005C3376.20030703065535@fatcity.com>


One way to do this is to write an PL/SQL block and use utl_file package

Guang

-----Original Message-----

Peter.McLarty_at_mincom.com
Sent: Thursday, July 03, 2003 4:21 AM
To: Multiple recipients of list ORACLE-L rows

Hi
Have the following table columns

curvedetails_id, curve_id, curvedetails_date, p0030, p0100, p0130, p0200, p0230, p0300, p0330,

I need to do a query that does the following output

CurveId"      ,"CurveDate",     "PNumber",     "PReading"
"206116",     "31-Dec-2002",   "P0030",           "26.18"
"206116",     "31-Dec-2002",    "P0100",          "8.80"


where the "pnumber" column is the column name in the table Is there anyway to get this without using a whole bunch of unions

Cheers

--


Peter McLarty               E-mail: Peter.Mclarty_at_mincom.com
Technical Consultant        WWW: http://www.mincom.com
APAC Technical Services     Phone: +61 (0)7 3303 3461
Brisbane,  Australia        Mobile: +61 (0)402 094 238
                            Facsimile: +61 (0)7 3303 3048
=================================================
A great pleasure in life is doing what people say you cannot do.

This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please delete it and notify the sender. The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Group of companies unless expressly stated otherwise.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author:
  INET: Peter.McLarty_at_mincom.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services

---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Guang Mei
  INET: gmei_at_incyte.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services

---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jul 03 2003 - 09:55:35 CDT

Original text of this message

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