Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 15930

Getting Error:Conversion failed when converting the varchar value 'NULL' to data type int.

$
0
0

Hi All,

When I am using below query,i am unable to convert varchar datatype to int,i am getting the error as below:

Conversion failed when converting the varchar value 'NULL' to data type int.

The query is as follows:

SELECT convert(int,[OrderDetailID])
      ,convert(int,[OrderID])
      ,convert(nvarchar(50),[Sku])
      ,convert(float(24),[Quantity])
      ,convert(int,[productid])
  FROM [dbo].[OrderDetails]

Can anyone give me necessary idea to get rid off from this error.


sudha


Viewing all articles
Browse latest Browse all 15930

Trending Articles