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: SQL Question

RE: SQL Question

From: Jeffery Stevenson <jeff_at_mpv.com>
Date: Thu, 4 Jan 2001 08:36:35 -0600
Message-Id: <10731.125707@fatcity.com>


You could always create a custom function that returns the concatenated value when you pass it the date...just a thought. :)

Jeffery Stevenson
Chief Databeast Tamer
Medical Present Value, Inc.
Austin, TX

-----Original Message-----
From: Johan Locke_at_i-Commerce Services [mailto:Johan.Locke_at_za.didata.com] Sent: Thursday, January 04, 2001 1:11 AM To: Multiple recipients of list ORACLE-L Subject: SQL Question

Hi All

Got the following table

DATE 		SEQNO		AREA_FROM	AREA_TO
----		-----		---------	--------
20-JAN	1		LONDON	NEW YORK
20-JAN	2		NEW YORK	ATLANTA
21-JAN	1		LONDON	PARIS
22-JAN	1		NAIROBI	PARIS
22-JAN	2		PARIS		NAIROBI
23-JAN	1		ATLANTA	NEW YORK


Now I need the following report based on the data:
DATE		AREAS				
----		-----				
20-JAN	LONDON - NEW YORK - ATLANTA
21-JAN	LONDON - PARIS
22-JAN	NAIROBI - PARIS - NAIROBI
23-JAN	ATLANTA - NEW YORK

(1) Any Ideas on how to do this report without using Dynamic SQL
(2) Is it possible to write a custom GROUP function in PL/SQL (i.e.,
something that would do a concatenate instead of a sum)?

Kind Regards

Johan Locke

http://www.JohanLocke.co.za
Certified Oracle 8 & 8i DBA
Certified Oracle Developer

Dimension Data i-Commerce Internet Services Direct Line: +27 11 516 5343
mailto:Johan.Locke_at_za.didata.com
http://www.didata.com

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Johan Locke_at_i-Commerce Services
  INET: Johan.Locke_at_za.didata.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).
Received on Thu Jan 04 2001 - 08:36:35 CST

Original text of this message

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