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: Merging Records

Re: Merging Records

From: rok <rok_at_MCI2000.com>
Date: 1998/05/21
Message-ID: <01bd8487$463d0f20$700337a6@raghus-computer>#1/1

Allan,

     If the table structure is like this:

key1
key2
key3
col1
col2
col3
col4
col5

How about?

select key1, key2, key3, max(col1), max(col2), max(col3), max(col4), max(col5)
from tableA
group by key1, key2, key3;

raghuvir

Allan Speir <r31055_at_email.sps.mot.com> wrote in article <356303EB.FE179A57_at_email.sps.mot.com>...
> Hello,
>
> I'm currently trying to merge the results of several queries with the
> same record structure but containing different values.
>
> e.g.
>
> If I had 3 records as follows
>
> 1 2 3 a b d f
> 1 2 3 a b c d f
> 4 5 6 7 8 9 x y z
>
> I would like the result to be
> 1 2 3 a b c d f
> 4 5 6 7 8 9 x y z
>
> I tried the SQL set operator UNION but this seems only to work with
> records which are identical.
>
> Any help would be greatly approeciated.
>
> Regards,
>
> Allan
>
Received on Thu May 21 1998 - 00:00:00 CDT

Original text of this message

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