O'Reilly logo

Mastering SQL Server 2014 Data Mining by Debarchan Sarkar, Amarpreet Singh Bassan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Error during changing of the data type of the table

We continue our discussion of the preceding data load. After the data load is completed with the default data type, we clean the data in the CONTROL column using the following query:

Update thads2011 set CONTROL=substring(CONTROL,2,LEN(CONTROL)-2);

After correcting the data, we change the data type of the table thads2011 and column CONTROL to integer. However, we still get the error that we will have to drop and recreate the table. We can get the table creation script for the table thads2011 from SQL Server Management Studio, and create another table after changing the data type, and copy the data. If we are using any method that involves conversion or casting from one data type to another, care ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required