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: How to write a sql query

Re: How to write a sql query

From: magesh <magesh_at_garoo.ne.jp>
Date: Mon, 27 Nov 2000 11:46:00 +0900
Message-Id: <10692.122899@fatcity.com>


Hi Allan ..Thanks for your suggestion , Allan , That table has "n" rows & "m" columns , I hope this will work only if the table has 3 rows & 3 columns.
Please any further suggestions ...

Thank you verymuch

Regards
Magesh
----- Original Message -----
From: "Allan Davis Sahadeo" <asahadeo_at_neal-and-massy.com> To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com> Sent: Thursday, November 23, 2000 7:30 AM Subject: Re: How to write a sql query

> This might be a possible solution assuming that you only have three rows
and
> three columns in the matrix :
>
> select distinct a.a1, b3, b4, b5
> from (select a1, b2 b3
> from testtb) a,
> (select a1, b2 b4
> from testtb) b,
> (select a1, b2 b5
> from testtb) c
> where a.a1 = b.a1
> and b.a1 = c.a1
> and a.b3 < b.b4
> and b.b4 < c.b5
> and c.b5 > a.b3
> and a.rowid != b.rowid
> and b.rowid != c.rowid
> and a.rowid != c.rowid
> /
>
> Tell me what you think about it ...
> Allan.
> ----- Original Message -----
> To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com>
> Sent: Wednesday, November 22, 2000 5:31 PM
>
>
> > use decode ...
> >
> > ----- Original Message -----
> > To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com>
> > Sent: Wednesday, November 22, 2000 5:56 AM
> >
> >
> > > Hi All
> > >
> > > How to write a sql query to print in the matrix report.
> > > Eg . Test table .
> > > a1 b1
> > > 1 2.3
> > > 1 3.5
> > > 1 7.0
> > > 2 1.7
> > > 2 2.6
> > > 2 2.9
> > > 3 1.3
> > > 3 2.9
> > > 3 3.0
> > >
> > >
> > > I need the output ,should be
> > >
> > > 1 2.3 3.5 7.0
> > > 2 1.7. 2.6 2.9
> > > 3 1.3 2.9 3.0
> > >
> > >
> > > Please , Any one suggest me how to write a sql query for this.
> > >
> > >
> > > Thanks & Regards
> > > Magesh
> > >
> > >
> > > --
> > > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > > --
> > > Author: magesh
> > > INET: magesh_at_garoo.ne.jp
> > >
> > > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> > > San Diego, California -- Public Internet access / Mailing Lists
> > > --------------------------------------------------------------------
> > > 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.com
> > --
> > Author: Ajay K
> > INET: ajay_at_tems.com
> >
> > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> > San Diego, California -- Public Internet access / Mailing Lists
> > --------------------------------------------------------------------
> > 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.com
> --
> Author: Allan Davis Sahadeo
> INET: asahadeo_at_neal-and-massy.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> 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
Received on Sun Nov 26 2000 - 20:46:00 CST

Original text of this message

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