Return-Path: <root@fatcity.cts.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id gBCFoM007613
 for <oracle-l@orafaq.net>; Thu, 12 Dec 2002 09:50:22 -0600
X-ClientAddr: 209.68.248.164
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id gBCFoL307608
 for <oracle-l@orafaq.net>; Thu, 12 Dec 2002 09:50:21 -0600
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id EAA13784;
 Thu, 12 Dec 2002 04:33:15 -0800 (PST)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 00518742; Thu, 12 Dec 2002 03:59:33 -0800
Message-ID: <F001.00518742.20021212035933@fatcity.com>
Date: Thu, 12 Dec 2002 03:59:33 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Robson, Peter" <pgro@bgs.ac.uk>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Robson, Peter" <pgro@bgs.ac.uk>
Subject: RE: Need help Reformatting output
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2A1D6.A8665FF0"
------_=_NextPart_001_01C2A1D6.A8665FF0
Content-Type: text/plain; charset="iso-8859-1"

Ah - a nice tricky one!
 
The explanation can be lengthy. The solution involves use of decode. The
best advice I can give is to refer you to the chapter on Decode in the Koch
/ Loney Oracle Press book ('Oracle Complete Reference'). The chapter is
entitled 'DECODE - Amazing Power in a Single Word'.
 
peter
edinburgh
-----Original Message-----
Sent: 12 December 2002 02:59
To: Multiple recipients of list ORACLE-L


I am looking for a way to display rows as columns.
For example:
Id         name    value
1          a          5
1          b          10
2          a          15
2          b          20
 
I need it as:
name    1          2
a          5         15
            b          10         20
 
Thank you in advance
Sergei.


*********************************************************************
This  e-mail   message,  and  any  files  transmitted   with  it, are
confidential  and intended  solely for the  use of the  addressee. If
this message was not addressed to  you, you have received it in error
and any  copying,  distribution  or  other use  of any part  of it is
strictly prohibited. Any views or opinions presented are solely those
of the sender and do not  necessarily represent  those of the British
Geological  Survey. The  security of e-mail  communication  cannot be
guaranteed and the BGS  accepts no liability  for claims arising as a
result of the use of this medium to  transmit messages from or to the
BGS. The BGS cannot accept any responsibility  for viruses, so please
scan all attachments.                            http://www.bgs.ac.uk
*********************************************************************


------_=_NextPart_001_01C2A1D6.A8665FF0
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word"><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Diso-8859-=
1">
<TITLE>RE: Active sessions chewing up a huge amount of RAM</TITLE>

<META content=3DWord.Document name=3DProgId>
<META content=3D"MSHTML 5.50.4807.2300" name=3DGENERATOR>
<META content=3D"Microsoft Word 10" name=3DOriginator><LINK=20
href=3D"cid:filelist.xml@01C2A146.F9857190" rel=3DFile-List><!--[if gte mso=
 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:UseFELayout/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<STYLE>@font-face {
	font-family: SimSun;
}
@font-face {
	font-family: \@SimSun;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; mso-=
header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; }
P.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-=
style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: Si=
mSun
}
LI.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-=
style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: Si=
mSun
}
DIV.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-=
style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: Si=
mSun
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
P {
	FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times =
New Roman"; mso-pagination: widow-orphan; mso-fareast-font-family: SimSun; =
mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
	COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply; mso-style=
-noshow: yes; mso-ansi-font-size: 10.0pt; mso-bidi-font-size: 10.0pt; mso-a=
scii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family=
: Arial
}
SPAN.SpellE {
	mso-style-name: ""; mso-spl-e: yes
}
SPAN.GramE {
	mso-style-name: ""; mso-gram-e: yes
}
DIV.Section1 {
	page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=3DEN-US style=3D"tab-interval: .5in" vLink=3Dblue link=3Dblue>
<DIV><SPAN class=3D929465311-12122002><FONT face=3DArial color=3D#0000ff si=
ze=3D2>Ah - a=20
nice tricky one!</FONT></SPAN></DIV>
<DIV><SPAN class=3D929465311-12122002><FONT face=3DArial color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D929465311-12122002><FONT face=3DArial color=3D#0000ff si=
ze=3D2>The=20
explanation can be lengthy. The solution involves use of decode. The best a=
dvice=20
I can give is to refer you to the chapter on Decode in the Koch / Loney Ora=
cle=20
Press book ('Oracle Complete Reference'). The chapter is entitled 'DECODE -=
 Amazing Power in a Single Word'.</FONT></SPAN></DIV>
<DIV><SPAN class=3D929465311-12122002><FONT face=3DArial color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D929465311-12122002><FONT face=3DArial color=3D#0000ff=20
size=3D2>peter</FONT></SPAN></DIV>
<DIV><SPAN class=3D929465311-12122002><FONT face=3DArial color=3D#0000ff=20
size=3D2>edinburgh</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px soli=
d; MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT face=3DTah=
oma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Sergei=20
  [mailto:sergei@netflip.com]<BR><B>Sent:</B> 12 December 2002=20
  02:59<BR><B>To:</B> Multiple recipients of list ORACLE-L<BR><B>Subject:</=
B>=20
  Need help Reformatting output<BR><BR></FONT></DIV>
  <DIV class=3DSection1>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times New Roman" color=3Dna=
vy=20
  size=3D3><SPAN style=3D"FONT-SIZE: 12pt; COLOR: navy">I am looking for a =
way to=20
  display rows as columns.<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times New Roman" color=3Dna=
vy=20
  size=3D3><SPAN style=3D"FONT-SIZE: 12pt; COLOR: navy">For=20
  example:<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times New Roman" color=3Dna=
vy=20
  size=3D3><SPAN style=3D"FONT-SIZE: 12pt; COLOR: navy">Id<SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
  </SPAN>name<SPAN style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;=20
  </SPAN>value<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times New Roman" color=3Dna=
vy=20
  size=3D3><SPAN style=3D"FONT-SIZE: 12pt; COLOR: navy">1<SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
  </SPAN>a<SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
  </SPAN>5<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times New Roman" color=3Dna=
vy=20
  size=3D3><SPAN style=3D"FONT-SIZE: 12pt; COLOR: navy">1<SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
  </SPAN>b<SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
  </SPAN>10<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times New Roman" color=3Dna=
vy=20
  size=3D3><SPAN style=3D"FONT-SIZE: 12pt; COLOR: navy">2<SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
  </SPAN>a<SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
  </SPAN>15<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times New Roman" color=3Dna=
vy=20
  size=3D3><SPAN style=3D"FONT-SIZE: 12pt; COLOR: navy">2<SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
  </SPAN>b<SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
  </SPAN>20<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times New Roman" color=3Dna=
vy=20
  size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: navy"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT face=3D"Times New Roman" color=3Dna=
vy=20
  size=3D3><SPAN style=3D"FONT-SIZE: 12pt; COLOR: navy">I need it=20
  as:<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><SPAN class=3DGramE><FONT face=3D"Times N=
ew Roman"=20
  color=3Dnavy size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: navy">name</SPAN></FONT></SPAN><FONT=20
  color=3Dnavy><SPAN style=3D"COLOR: navy"><SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
  </SPAN>2<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><SPAN class=3DGramE><FONT face=3D"Times N=
ew Roman"=20
  color=3Dnavy size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt; COLOR: navy">a</SPAN></FONT></SPAN><FONT=20
  color=3Dnavy><SPAN style=3D"COLOR: navy"><SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
  </SPAN></SPAN></FONT><FONT color=3Dnavy><SPAN style=3D"COLOR: navy">5<SPA=
N=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
  </SPAN>15<o:p></o:p></SPAN></FONT></P>
  <P><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
  </SPAN><SPAN class=3DGramE>b</SPAN><SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
  </SPAN>10<SPAN=20
  style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
  </SPAN>20<o:p></o:p></SPAN></FONT></P>
  <P><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o=
:p></SPAN></FONT></P>
  <P><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thank you in=
   advance<o:p></o:p></SPAN></FONT></P>
  <P><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Sergei.<o:p></=
o:p></SPAN></FONT></P></DIV></BLOCKQUOTE><CODE><FONT SIZE=3D3><BR>
<BR>
*********************************************************************<BR>
This  e-mail   message,  and  any  files  transmitted   with  it, are<BR>
confidential  and intended  solely for the  use of the  addressee. If<BR>
this message was not addressed to  you, you have received it in error<BR>
and any  copying,  distribution  or  other use  of any part  of it is<BR>
strictly prohibited. Any views or opinions presented are solely those<BR>
of the sender and do not  necessarily represent  those of the British<BR>
Geological  Survey. The  security of e-mail  communication  cannot be<BR>
guaranteed and the BGS  accepts no liability  for claims arising as a<BR>
result of the use of this medium to  transmit messages from or to the<BR>
BGS. The BGS cannot accept any responsibility  for viruses, so please<BR>
scan all attachments.                            http://www.bgs.ac.uk<BR>
*********************************************************************<BR>
</FONT></CODE>
</BODY></HTML>

------_=_NextPart_001_01C2A1D6.A8665FF0--
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Robson, Peter
  INET: pgro@bgs.ac.uk

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@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).

