943,890 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 2409
  • MySQL RSS
Jun 29th, 2008
0

INSERT columns into rows

Expand Post »
hi,

i have a table called exam,
it has following columns
-----------------------------------------------------------------
| ID | QUESTION | OPTION_1 | OPTION_2 | OPTION_3 |
-----------------------------------------------------------------

now I've normalized it and put the exam options in another table called 'exam_option' table which keeps these options in rows instead of columns. Since i have a lots of data i want to put this information in my new table. Is there anyway to create such query whihc can do that.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
daniyalnawaz is offline Offline
9 posts
since May 2008
Jun 29th, 2008
0

Re: INSERT columns into rows

Hi

This is a very simple standard task you always have to solve, if one-to-many related tables need to get together. Is that not related to your other nice thread, E-commerce data design issue of May 12th, 2008, what is still dangling about?


krs,
tesu
Reputation Points: 158
Solved Threads: 98
Master Poster
tesuji is offline Offline
720 posts
since Apr 2008
Jun 30th, 2008
0

Re: INSERT columns into rows

Click to Expand / Collapse  Quote originally posted by tesuji ...
Hi

This is a very simple standard task you always have to solve, if one-to-many related tables need to get together. Is that not related to your other nice thread, E-commerce data design issue of May 12th, 2008, what is still dangling about?


krs,
tesu
No its for my different project. I figured out the E-commerce problem with your and others help. Actually the system grew into a whole inventory managements system so lots of option became a part of SKUs and some options were actually products offered in package with other products. By the way thank you for your help.

Well i've retrieved and inserted my data through php script. Still any way though SQL will be appreciated.

Thank You!
Daniyal
Reputation Points: 10
Solved Threads: 0
Newbie Poster
daniyalnawaz is offline Offline
9 posts
since May 2008
Jul 1st, 2008
0

Re: INSERT columns into rows

Hi daniyal

you may cast a glance on http://www.daniweb.com/forums/thread132147.html to get your inspiration from on how to solve your problem

krs,
tesu
Last edited by tesuji; Jul 1st, 2008 at 9:46 pm.
Reputation Points: 158
Solved Threads: 98
Master Poster
tesuji is offline Offline
720 posts
since Apr 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: query
Next Thread in MySQL Forum Timeline: MYSQL User and Backup





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC