Shweta
Well-known Member
- Joined
- Jun 5, 2011
- Messages
- 514
Hello All,
I have imported some data from a text file into SQL server 20008 R2. All the columns of the data have been imported as varchar(50). Now I am trying to change the datatype of columns using alter table statement. But the problem is, there are few numeric columns with missing values (as I got this data from SAS, it shows dot(.) in numeric columns where the value is missing). When I try to convert them from varchar to float, SQL throws an error "Error converting data type varchar to float.". Kindly suggest.
Regards,
Shweta Jain
I have imported some data from a text file into SQL server 20008 R2. All the columns of the data have been imported as varchar(50). Now I am trying to change the datatype of columns using alter table statement. But the problem is, there are few numeric columns with missing values (as I got this data from SAS, it shows dot(.) in numeric columns where the value is missing). When I try to convert them from varchar to float, SQL throws an error "Error converting data type varchar to float.". Kindly suggest.
Regards,
Shweta Jain