Relative Content

Tag Archive for sqlsql-serversql-insert

Converting non-numeric entries as NULL

I am trying to move all the data from one column in an Excel sheet into a SQL Server database table using SQL Server Management Studio. The data in the table covers different OS versions by year, and some of them contain letters, such as 2008R2.

SQL converting non-numeric entries as NULL

I am trying to move all the data from one column in an Excel sheet into a Database table in SQL Server Management Studio. The data in the table covers different OS versions by year, and some of them contain letters, such as 2008R2. When I tried to move the data into the table it gave me an error saying that Null types are not allowed in that column. But when I changed the column to allow Null types, anything that contained a letter or a non-numeric character was designated as Null. The attribute in question is stored in its original table as a float, but I want it to be varchar in my table.