Re: Selecting unknown columns

2001-12-26 Thread DL Neil
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 answer is

Re: Selecting unknown columns

2001-12-17 Thread Dave Rolsky
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 the

Selecting unknown columns

2001-12-16 Thread Alex Kirk
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 the appropriate field. For example, if I

re: Selecting unknown columns

2001-12-16 Thread Greg Sheffield
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 that I've got