Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help - Flatten that file!???
I'm not sure if this will work...
maybe you can try this..
select name, id, max(dog), max(cat), max(fish)
group by name, id
/
Dave Smith wrote in message <373F6083.B551FDC8_at_spamMeNot.nbnet.nb.ca>...
>I need a push in the right direction, since my experience with SQL isn't
>deep enough to ferret this one out.
>The real world table I need to collapse actually has about 35 columns,
>each column has a single value for each instance of the NAME/ID pair.
>Ultimately, I need to make the first table end up looking like the
>second.
>I rather have a hint then be give the actual, SQL statement.
>Any pointers would be greatly appreciated,
>Thanks.
>
>
>NAME ID DOG CAT FISH
>---------- --------- ---------- ---------- ----------
>Ted 1 Big
>Ted 1 Small
>Ted 1 Small
>Kim 2 Small
>Kim 2 Big
>Kim 2 Big
>
>
>NAME ID DOG CAT FISH
>---------- --------- ---------- ---------- ----------
>Ted 1 Big Small Small
>Kim 2 Small Big Big
>
>
>
Received on Sun May 16 1999 - 21:02:19 CDT
![]() |
![]() |