If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > From Column related Row values

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-05-12, 01:40
kalaiselvan328 kalaiselvan328 is offline
Registered User
 
Join Date: Mar 2011
Posts: 3
From Column related Row values

Hi,
Am posting this thread to fetch the Column related row values..

TableA_100: (Here 100 is the Particular Section ID)
Is dynamically created in our product. Where it consists of ID and all Questionarie columns which is dynamically created from another table.

TableB: (Questionarrie)
[SectionID] [GID] [QID] [SQID] [Questions]
100 11 A a Q1
100 11 B b Q2
100 11 C c Q3

From Table B--> Table A columns created dynamically
TABLE A:
[ID] [100X11XBXb] [100X11XBXb] [100X11XCXc]
1 ANS1 ANS2 ANS3
2 ANS8 ANS9 ANS11


From above the tables, when we choose the Section, from the selected section we can able to get the Column names from TableA:

[COLUMN] --> ID,[100X11XBXb],[100X11XBXb],[100X11XCXc]

Need this column names as rows and its corresponding Questions must be populated.

Expecting Result
----------------

[COLUMN] [QUESTION]
[100X11XBXb] Q1
[100X11XBXb] Q2
[100X11XCXc] Q3


Above result column names comes from TABLE:A and the Question names from TABLE:B.

Please help me to get the solution with a QUERY.



Regards,
Kalaiselvan R
Love Yourself First....
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On