Convert NVARCHAR to NUMERICO

0

I have a table that has a VALUE column, but the column is in nvarchar, this nvarchar column does not let me do the correct formatting in the report I'm using select.

I can do the conversion in SQL Server for the money type, but it is not in the correct standard. Inside Visual Studio I used converters that also do not work correctly.

Example, in the table if you have the value 2952.20 doing the conversion to money it gets 295220.00 that is wrong. In more of type, it shows the error message that nvarchar can not convert to numeric type.

The conversion methods I used in SQL:

CAST(ISNULL(VALOR,0) as MONEY) as VALOR

COVNERT(MONEY, ISNULL(VALOR,0)) as VALOR

Is there any kind of treatment I need to do to convert nvarchar field to some numeric type correctly?

    
asked by anonymous 27.04.2017 / 21:52

0 answers