UPDATE swcustomfieldvalues AS cfv LEFT JOIN swtickets AS tic  ON tic.ticketid = cfv.typeid SET tic.tickettypeid = '6' WHERE cfv.customfieldid = '12' AND cfv.fieldvalue = '29';
UPDATE swcustomfieldvalues AS cfv LEFT JOIN swtickets AS tic  ON tic.ticketid = cfv.typeid SET tic.tickettypeid = '7' WHERE cfv.customfieldid = '12' AND cfv.fieldvalue = '30';
UPDATE swcustomfieldvalues AS cfv LEFT JOIN swtickets AS tic  ON tic.ticketid = cfv.typeid SET tic.tickettypeid = '8' WHERE cfv.customfieldid = '12' AND cfv.fieldvalue = '31';
UPDATE swcustomfieldvalues AS cfv LEFT JOIN swtickets AS tic  ON tic.ticketid = cfv.typeid SET tic.tickettypeid = '9' WHERE cfv.customfieldid = '12' AND cfv.fieldvalue = '32';
UPDATE swcustomfieldvalues AS cfv LEFT JOIN swtickets AS tic  ON tic.ticketid = cfv.typeid SET tic.tickettypeid = '10' WHERE cfv.customfieldid = '12' AND cfv.fieldvalue = '33';
UPDATE swcustomfieldvalues AS cfv LEFT JOIN swtickets AS tic  ON tic.ticketid = cfv.typeid SET tic.tickettypeid = '11' WHERE cfv.customfieldid = '12' AND cfv.fieldvalue = '34';
UPDATE swcustomfieldvalues AS cfv LEFT JOIN swtickets AS tic  ON tic.ticketid = cfv.typeid SET tic.tickettypeid = '12' WHERE cfv.customfieldid = '12' AND cfv.fieldvalue = '35';
UPDATE swcustomfieldvalues AS cfv LEFT JOIN swtickets AS tic  ON tic.ticketid = cfv.typeid SET tic.tickettypeid = '13' WHERE cfv.customfieldid = '12' AND cfv.fieldvalue = '36';
UPDATE swcustomfieldvalues AS cfv LEFT JOIN swtickets AS tic  ON tic.ticketid = cfv.typeid SET tic.tickettypeid = '14' WHERE cfv.customfieldid = '12' AND cfv.fieldvalue = '37';

