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 return Multi-row query into a single row?

Re: How to return Multi-row query into a single row?

From: <DBarbour_at_austin.isd.tenet.edu>
Date: Mon, 25 Jun 2001 08:16:39 -0700
Message-ID: <F001.00336847.20010625074100@fatcity.com>

Don,

In you code, add the line

          GROUP BY DocID

David A. Barbour
Oracle DBA, OCP
AISD
512-414-1002

                                                                                       
                       
                    "Don Dealy                                                         
                       
                    II"                  To:     Multiple recipients of list ORACLE-L 
<ORACLE-L_at_fatcity.com>  
                    <dondealy_at_tel        cc:                                           
                       
                    eport.com>           Subject:     How to return Multi-row query 
into a single row?        
                    Sent by:                                                           
                       
                    root_at_fatcity.                                                      
                       
                    com                                                                
                       
                                                                                       
                       
                                                                                       
                       
                    06/24/2001                                                         
                       
                    11:40 PM                                                           
                       
                    Please                                                             
                       
                    respond to                                                         
                       
                    ORACLE-L                                                           
                       
                                                                                       
                       
                                                                                       
                       




Sample Table

DocId Integer
DateVal Date
TextVal Varchar2(40)
NumVal Number(10,0)

Sample Data

DocId    DateVal        TextVal        NumVal
12       01/15/2000
12                      Sally Smith
5                       Bob Brown
5                                      48702
5        07/22/2001
4                                      152



Desired result after SELECT...

DocId    DateVal        TextVal        NumVal
12       01/15/2000     Sally Smith
5        07/22/2001     Bob Brown      48702
4                                      152


How do I write a query to produce the "single row" result?

Thx - Don

e: dondealy_at_teleport.com

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: DBarbour_at_austin.isd.tenet.edu

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 Mon Jun 25 2001 - 10:16:39 CDT

Original text of this message

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