![]() |
| |||
| Hello, Client has requested that I merge certain rows of data in this table CREATE TABLE `answer` ( `id` int(11) NOT NULL auto_increment, `applicant` varchar(255) REFERENCES applicant(id), `question` int(11) REFERENCES question(id), `answer` text NOT NULL, PRIMARY KEY (`id`) ) The relationship between each question and applicant is unique. What I need to do is look up each applicant's answers to question 3 and question 4 and merge them into the answer for question 3. I was feebly trying things like: UPDATE testAnswer SET answer = CONCAT( (SELECT answer AS start FROM testAnswer WHERE question = 3) UNION (SELECT answer AS finish FROM testAnswer WHERE question = 4) GROUP BY applicant ) Can anyone point me in the right direction? TIA JG |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |