Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two different tables with different values and i want to connect the answers to te questions.
How can i make a good link table?
My first table is:
answers:SQL SELECT answer0,answer1,enz...answer_idFROM mto1.answers;
my seccond table is:
Questions:SQL SELECTquestion,question_nrFROM mto1.`questions`;
How can i connect question 1 to answer 1?
Greetz,
Dirk
So field answer1 should match up to the question associated with question_nr = 1? I think something like this:
QuestionsAndAnswers:CROSSTABLE (question_nr, answer) // one row per answer, keyed by question_nrLOAD answer_id,answer0,answer1etc.;SQL SELECT answer_id,answer0,answer1etc.FROM mto1.answers;INNER JOIN (QuestionsAndAnswers)LOAD question,question_nrFROMmto1.'QUESTIONS';