I tried to import a solution today and go an error, an SQL error similar to the one below
The culprit in my situation was I had a field which the field was of type int
I then had deleted the variable and created a new one with the same name of type picklist
When you try and import the solution I received an SQL error
To resolve the error you have to delete the variable in the CRM organisation you are trying to import the solution to. Then you will be able to import the solution.
The best way to find the variable is to use WinMerge and compare the customization.xml files in the previous solution file and the new solution customization.xml. You can get the solution file by exporting it if you don’t have one to hand.
This makes sense because SQL will have a column with incompatible data and a column with the name you are trying to create a new column for.