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: Query help required urgently

Re: Query help required urgently

From: Krishnaswamy, Ranganath <Ranganath.Krishnaswamy_at_blr.hpsglobal.com>
Date: Thu, 15 May 2003 07:51:02 -0800
Message-ID: <F001.00599950.20030515075102@fatcity.com>


Hi List,

I am forwarding the data format for the table as the OLE.obj file is filtered by the list.

Here is the table structure:

Allotment_name	Seg_org_code	Seg_dest_code Flight_no	
ADL				SIN				SFO
SQ0002	    		
ADL1				SIN				SFO
SQ0012	    		
ADL1				SFO			YYZ
LH7777	    		
ADL2				SIN				LON
SQ0016	    		
ADL2				LON			SFO
LH8901	    		
ADL2				SFO			YYZ
LH7777	    		
ADL3				SIN				SFO
SQ0012	    		
ADL3				SFO			PHL

LH7909

Here is how the display should be:

Allotment_name	Seg_org_code	Seg_dest_code Flight_no	New_column
ADL				SIN				SFO
SQ0002	    		1
ADL1				SIN				SFO
SQ0012	    		1
ADL1				SFO			YYZ
LH7777	    		2
ADL2				SIN				LON
SQ0016	    		1
ADL2				LON			SFO
LH8901	    		2
ADL2				SFO			YYZ
LH7777	    		3
ADL3				SIN				SFO
SQ0012	    		1
ADL3				SFO			PHL
LH7909	    		2

Thanks and Regards,

Ranganath

> -----Original Message-----
> From: Krishnaswamy, Ranganath
> Sent: Thursday, May 15, 2003 7:42 PM
> To: Multiple recipients of list ORACLE-L
> Subject: Query help required urgently
>
> Hi List,
>
> I have a table with the data as follows:
>
> <<...OLE_Obj...>>
>
> In the above table the allotment_names ADL, ADL1, ADL2 and ADL3 have
> 1, 2, 3 and 2 segments. The Seg_dest_code
> of previous segment is the Seg_org_code for next segment ADL1,
> ADL2 and ADL3. I want to display a new dynamic column in the select
> clause query whose result set should be displayed as follows:
>
> <<...OLE_Obj...>>
>
> Is it possible to write a query in SQL or a stored procedure
> in Pl/Sql to get the above displayed data? If so, how do I do?
> Can I achieve the desired result using CONNECT BY clause?
> If
> so, how? If not, is it possible to do by any other way?
> Any help in this regard is very much appreciated.
>
> Thanks and Regards,
>
> Ranganath
>
>
>
> WARNING: The information in this message is confidential and may be
> legally
> privileged. It is intended solely for the addressee. Access to this
> message
> by anyone else is unauthorised. If you are not the intended recipient,
> any
> disclosure, copying, or distribution of the message, or any action or
> omission taken by you in reliance on it, is prohibited and may be
> unlawful.
> Please immediately contact the sender if you have received this message in
> error. Thank you.
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Krishnaswamy, Ranganath
> INET: Ranganath.Krishnaswamy_at_blr.hpsglobal.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).
WARNING: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Krishnaswamy, Ranganath
  INET: Ranganath.Krishnaswamy_at_blr.hpsglobal.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 May 15 2003 - 10:51:02 CDT

Original text of this message

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