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 gBCCpAf20157
 for <oracle-l@orafaq.net>; Thu, 12 Dec 2002 06:51:10 -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 gBCCpA320151
 for <oracle-l@orafaq.net>; Thu, 12 Dec 2002 06:51:10 -0600
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id BAA94377;
 Thu, 12 Dec 2002 01:34:07 -0800 (PST)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 00518447; Thu, 12 Dec 2002 00:38:58 -0800
Message-ID: <F001.00518447.20021212003858@fatcity.com>
Date: Thu, 12 Dec 2002 00:38:58 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Yechiel Adar" <adar76@inter.net.il>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Yechiel Adar" <adar76@inter.net.il>
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_000_05D9_01C2A1CA.0222DC60"
------=_NextPart_000_05D9_01C2A1CA.0222DC60
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

RE: Active sessions chewing up a huge amount of RAMYou can try =
concatenation.

Pseudo code:
c1 :=3D null
c2 :=3D null
c3 :=3D null
open cursor
while not end-of-set
     c1 :=3D id || ' '=20
     c2 :=3D name || ' '
    c3 :=3D vale || ' '=20
end-loop

Yechiel Adar
Mehish
  ----- Original Message -----=20
  From: Sergei=20
  To: Multiple recipients of list ORACLE-L=20
  Sent: Thursday, December 12, 2002 4:59 AM
  Subject: Need help Reformatting output


  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

  =20

  I need it as:

  name    1          2

  a          5         15

              b          10         20

  =20

  Thank you in advance

  Sergei.


------=_NextPart_000_05D9_01C2A1CA.0222DC60
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><TITLE>RE: Active sessions =
chewing up a huge amount of RAM</TITLE>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3DWord.Document name=3DProgId>
<META content=3D"MSHTML 5.00.2314.1000" 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;
}
P.MsoNormal {
	FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: SimSun
}
LI.MsoNormal {
	FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: SimSun
}
DIV.MsoNormal {
	FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: SimSun
}
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-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN-LEFT: 0in; =
MARGIN-RIGHT: 0in; 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-ascii-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 bgColor=3D#ffffff lang=3DEN-US link=3Dblue style=3D"tab-interval: =
.5in"=20
vLink=3Dblue>
<DIV><FONT face=3DArial size=3D3>You can try concatenation.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Pseudo code:</FONT></DIV>
<DIV><FONT face=3DArial>c1 :=3D null</FONT></DIV>
<DIV><FONT face=3DArial>c2 :=3D null</FONT></DIV>
<DIV><FONT face=3DArial>c3 :=3D null</FONT></DIV>
<DIV><FONT face=3DArial>open cursor</FONT></DIV>
<DIV><FONT face=3DArial>while not end-of-set</FONT></DIV>
<DIV><FONT face=3DArial size=3D3>&nbsp;&nbsp;&nbsp;&nbsp; c1 :=3D id || =
' '=20
</FONT></DIV>
<DIV><FONT face=3DArial>&nbsp;&nbsp;&nbsp;&nbsp; c2 :=3D name || ' =
'</FONT></DIV>
<DIV><FONT face=3DArial>&nbsp;&nbsp;&nbsp; c3 :=3D vale || ' ' =
</FONT></DIV>
<DIV><FONT face=3DArial>end-loop</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>Yechiel Adar<BR>Mehish</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A href=3D"mailto:sergei@netflip.com" =
title=3Dsergei@netflip.com>Sergei</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
href=3D"mailto:ORACLE-L@fatcity.com"=20
  title=3DORACLE-L@fatcity.com>Multiple recipients of list ORACLE-L</A> =
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, December 12, =
2002 4:59=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Need help Reformatting =

  output</DIV>
  <DIV><BR></DIV>
  <DIV class=3DSection1>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT color=3Dnavy face=3D"Times New =
Roman"=20
  size=3D3><SPAN style=3D"COLOR: navy; FONT-SIZE: 12pt">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 color=3Dnavy face=3D"Times New =
Roman"=20
  size=3D3><SPAN style=3D"COLOR: navy; FONT-SIZE: 12pt">For=20
  example:<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT color=3Dnavy face=3D"Times New =
Roman"=20
  size=3D3><SPAN style=3D"COLOR: navy; FONT-SIZE: 12pt">Id<SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=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 color=3Dnavy face=3D"Times New =
Roman"=20
  size=3D3><SPAN style=3D"COLOR: navy; FONT-SIZE: 12pt">1<SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  </SPAN>a<SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  </SPAN>5<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT color=3Dnavy face=3D"Times New =
Roman"=20
  size=3D3><SPAN style=3D"COLOR: navy; FONT-SIZE: 12pt">1<SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  </SPAN>b<SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  </SPAN>10<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT color=3Dnavy face=3D"Times New =
Roman"=20
  size=3D3><SPAN style=3D"COLOR: navy; FONT-SIZE: 12pt">2<SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  </SPAN>a<SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  </SPAN>15<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT color=3Dnavy face=3D"Times New =
Roman"=20
  size=3D3><SPAN style=3D"COLOR: navy; FONT-SIZE: 12pt">2<SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  </SPAN>b<SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  </SPAN>20<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT color=3Dnavy face=3D"Times New =
Roman"=20
  size=3D3><SPAN=20
  style=3D"COLOR: navy; FONT-SIZE: =
12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><FONT color=3Dnavy face=3D"Times New =
Roman"=20
  size=3D3><SPAN style=3D"COLOR: navy; FONT-SIZE: 12pt">I need it=20
  as:<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><SPAN class=3DGramE><FONT color=3Dnavy =

  face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"COLOR: navy; FONT-SIZE: 12pt">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;&nbsp;&nbsp;=20
  </SPAN>2<o:p></o:p></SPAN></FONT></P>
  <P style=3D"MARGIN-LEFT: 0.5in"><SPAN class=3DGramE><FONT color=3Dnavy =

  face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"COLOR: navy; FONT-SIZE: 12pt">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;&nbsp;&nbsp;=20
  </SPAN></SPAN></FONT><FONT color=3Dnavy><SPAN style=3D"COLOR: =
navy">5<SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  </SPAN>15<o:p></o:p></SPAN></FONT></P>
  <P><FONT color=3Dnavy face=3DArial size=3D2><SPAN=20
  style=3D"COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"><SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;=20
  </SPAN>10<SPAN=20
  style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  </SPAN>20<o:p></o:p></SPAN></FONT></P>
  <P><FONT color=3Dnavy face=3DArial size=3D2><SPAN=20
  style=3D"COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: =
10pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P><FONT color=3Dnavy face=3DArial size=3D2><SPAN=20
  style=3D"COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">Thank you =
in=20
  advance<o:p></o:p></SPAN></FONT></P>
  <P><FONT color=3Dnavy face=3DArial size=3D2><SPAN=20
  style=3D"COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: =
10pt">Sergei.<o:p></o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTM=
L>

------=_NextPart_000_05D9_01C2A1CA.0222DC60--

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Yechiel Adar
  INET: adar76@inter.net.il

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

