View Full Version : Create one record of Multi record
Mohammad
03-26-2004, 12:49 PM
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
Sybrand Bakker
03-27-2004, 10:37 AM
On 26 Mar 2004 12:49:33 -0800, mhakimjavadi@hotmail.com (Mohammad)
wrote:
HiI am very new in SQL and I need you help.I have multi record like : ID P_CODEIDNUM1 AAIDNUM1 BBIDNUM1 CCIDNUM1 DDIDNUM1 YYIDNUM1 ZZIDNUM2 AAIDNUM2 BBIDNUM2 CCNow I have to make new table of those record like this :IDNUM1 AA BB CC DD (one record FOR ONE ID)IDNUM1 XX YY ZZIDNUM2 AA BB CCSo 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
MyLounge.com Site Map
Forum:
Cars,
Cell Phone,
Database,
Games,
Home Improvement,
IT,
Music,
School,
Sports,
Web Design,
Web Server,
Weight Loss
The MyLounge.com forum is intended for informational use only and should not
be relied upon and is not a substitute for any advice. The information contained
on MyLounge.com are opinions and suggestions of members and is not a representation
of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for
the accuracy, completeness or usefulness of any postings or the qualifications
of any person responding. Please consult a expert or seek the services of an
attorney in your area for more accuracy on your specific situation. Please note
that our forums also serve as mirrors to Usenet newsgroups. Many posts you see
on our forums are made by newsgroup users who may not be members of MyLounge.com
Term of Service
vBulletin v3.0.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.