This question is in reference to Atlassian Documentation: Unable to move issue to another Issue Type due to 'The issue type selected is invalid' error
I am trying to run this update query:
INSERT INTO optionconfiguration VALUES ((SELECT MAX(id)+1 FROM optionconfiguration), 'issuetype', '10004', 10000, (SELECT MAX(sequence)+1 FROM optionconfiguration WHERE fieldconfig=10000));
And I am getting an error:
INSERT INTO optionconfiguration VALUES ((SELECT MAX(id)+1 FROM optionconfiguration), 'issuetype', '10004', 10000, (SELECT MAX(sequence)+1 FROM optionconfiguration WHERE fieldconfig=10000)) Error Code: 1093. You can't specify target table 'optionconfiguration' for update in FROM clause 0,035 sec
I think its related to this issue with inner queries. Any idea how to turn this SQL statement to correct one?