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

2003-07-03 Thread Peter . McLarty
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: [EMAIL PROTECTED]
Technical ConsultantWWW: http://www.mincom.com
APAC Technical Services Phone: +61 (0)7 3303 3461
Brisbane,  AustraliaMobile: +61 (0)402 094 238
Facsimile: +61 (0)7 3303 3048
=
A great pleasure in life is doing what people say you cannot do.

- Walter Bagehot (1826-1877 British Economist)
=
Mincom The People, The Experience, The Vision

=

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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).


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

2003-07-03 Thread Guang Mei
One way to do this is to write an PL/SQL block and use utl_file package

Guang

-Original Message-
[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
Technical ConsultantWWW: http://www.mincom.com
APAC Technical Services Phone: +61 (0)7 3303 3461
Brisbane,  AustraliaMobile: +61 (0)402 094 238
Facsimile: +61 (0)7 3303 3048
=
A great pleasure in life is doing what people say you cannot do.

- Walter Bagehot (1826-1877 British Economist)
=
Mincom The People, The Experience, The Vision

=

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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).