CREATE TEMPORARY TABLE IF NOT EXISTS tmpk (RowNumber int KEY AUTO_INCREMENT, qID char(32)) TYPE=MEMORY; 
INSERT tmpk (qID) SELECT variable_name FROM ImportSpecs;
insert into FormQuestions (fID,qID)
select 'med_opinions',variable_name 
from ImportSpecs;
update FormQuestions,tmpk
set qOrder=RowNumber
where fID='med_opinions' and FormQuestions.qID=tmpk.qID;
