select expressionid, expression, handler from tbl_vce_expressions where 1 = 1 and expressionId = and category = order by category, rank insert into tbl_vce_history (command, expression, status, matchedexpressionid, userid, params, handler) values ( , , , , , , )