mysql - Error while trying to execute several statements in case -
i have trouble creating mysql-statement following:
# mandatory values set @thermalcondition = 'hot condition (cruise)'; set @partid = 2; # partid xml-file set @partpos = 1; # airfoil position select case @thermalcondition when 'hot condition (cruise)' ( select @componentid := `componentid` `inspection_airfoil` `partid` = @partid; # generate entry same part in hot condition in table `inspection_airfoil` insert `inspection_part`(`thermalpartcondition`, `partpos`, `componentid`) values ('hot condition (cruise)', @partpos,@componentid); # part id hot stuff set @partid = (select last_insert_id()); ) end; if variable @thermalcondition named "hot condition (cruise)" create new entry in table 'inspection_part' , store generated primary key , variable (here: @partid).
i interested in ideas improve pice of code , appreciate help.
Comments
Post a Comment