Re: Create one record of Multi record

From: Sybrand Bakker <gooiditweg_at_nospam.demon.nl>
Date: Sat, 27 Mar 2004 19:37:45 +0100
Message-ID: <pdib60l1jt0hshtqdhapsl8bh43075t6qu_at_4ax.com>


On 26 Mar 2004 12:49:33 -0800, mhakimjavadi_at_hotmail.com (Mohammad) wrote:

>Hi
>
>I am very new in SQL and I need you help.I have multi record like :
>
> ID P_CODE
>IDNUM1 AA
>IDNUM1 BB
>IDNUM1 CC
>IDNUM1 DD
>IDNUM1 YY
>IDNUM1 ZZ
>IDNUM2 AA
>IDNUM2 BB
>IDNUM2 CC
>
>Now I have to make new table of those record like this :
>
>IDNUM1 AA BB CC DD (one record FOR ONE ID)
>IDNUM1 XX YY ZZ
>IDNUM2 AA BB CC
>
>So if the ID has more than 4 of P_CODE I have to generate new record.
>
>Please advise.
>
>Thanks a lot

I wouldn't switch from a normalized design (scenario 1) to a non-normalized design (scenario 2) or you must enjoy dealing with messes.

--
Sybrand Bakker, Senior Oracle DBA
Received on Sat Mar 27 2004 - 19:37:45 CET

Original text of this message