Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Problem

Re: SQL Problem

From: <BigBoote66_at_hotmail.com>
Date: 16 Mar 2005 14:15:22 -0800
Message-ID: <1111011322.407697.204310@z14g2000cwz.googlegroups.com>


Well, assuming that you always have exactly two rows in tab1 for a particular value of col1, and that you want the col2 values to be in alphabetical order, this will work:

  SELECT tab1.col1

, tab2.col3
, MIN(col2) || ' ' || MAX(col2)

    FROM tab1

, tab2

   WHERE tab1.col1 = tab2.col1
GROUP BY tab1.col1

, tab2.col3;
Received on Wed Mar 16 2005 - 16:15:22 CST

Original text of this message

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