• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 966
  • Last Modified:

Error converting data type nvarchar to numeric.

Trying to update a MONEY col with values from a nvarchar(20)
I get the error  Error converting data type nvarchar to numeric.

How do I do this.. the data in the format  "123.50"
0
JElster
Asked:
JElster
  • 2
1 Solution
 
brad2575Commented:
use this to convert the field
cast(NvarcharField as money)
0
 
JElsterAuthor Commented:
Cannot convert a char value to money. The char value has incorrect syntax.


select Cast(commsamt as money)  from Commissions

Commsamt is nvarchar 20 " 1243.54"
0
 
brad2575Commented:
try

cast(cast(NvarcharField as decimal(20, 2)) as money)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now