Alex,
With reference to Dave's comments/suggestions:-
> > I've got a 700-question multiple choice quiz that I've got imported into
> > MySQL, with one small problem: the answers to the quiz are not a separate
> > column. I have three columns for each of the possible answers; the correct
> > answ
On Mon, 17 Dec 2001, Alex Kirk wrote:
> I've got a 700-question multiple choice quiz that I've got imported into
> MySQL, with one small problem: the answers to the quiz are not a separate
> column. I have three columns for each of the possible answers; the correct
> answer is denoted by a "*" in
How about this:
update table
set answer = concat_ws("," ,
if(left(columnA,1)="*",substring(columnA,2),""),
if(left(columnB,1)="*",substring(columnB,2),""),
if(left(columnC,1)="*",substring(columnC,2),"") )
Greg
> I've got a 700-question multiple choice quiz th